Use the new meta_workspace_manager_reorder_workspace() method instead of moving windows around.
meta_workspace_manager_reorder_workspace()