Otherwise the global shortcut will be set many times. This also removes the unneeded condition. (cherry picked from commit 8b41419c)