I have the same problem as described in When switching to a different space, OS X sometimes just switches back to the previous space. Is there a fix for this? but on Sierra, not Lion, and only on an external display (not always the same external display).
I have tried the solution on that question (deleting everything from your desktop), but that doesn't fix it. Anyone have any suggestions as my current workaround is to kill the space, recreate it, then move the windows back to that space which is extremely annoying.