For me it usually happens due to the above shift+movement mishap, most often on my q/e strafe keys actually. My easy fix for it is just press all movement keys in once swift swoop once on my 2nd box. Whatever key might have been in 'pressed down' state will be pressed down and be released now, stopping the whole mess.

However the first 2-3 times it happened, it basically cost me a wipe :P.