Fix for workspace switching after moving a window, closes #2011