I ran into the same bug. The problem seems to be with units levelling up. Often when a unit levels up, the idle worker count goes up.
I'm guessing the unit gets replaced with an upgraded version, but the old version isn't completely disposed.
I think the reason you can't assign units when this happens, is the game is trying to assign a unit that doesn't exist.
The steps to reproduce seem to be to let a bunch of units level up, and then try and move them around.
Hope that helps