Character stops standing still after giving potion to merc

I have mapped the space bar to be the key I press to keep my character from moving. If I am standing still and attacking and I use Shift-[1-4] to feed a potion to my mercenary, my character stops standing still, even though I am still holding the space bar down. My work-around is to quickly let go of the space bar and hit it again after feeding the mercenary a potion, but I shouldn’t have to. If I am pressing the button to stand still, I should not move.

I suspect that I also stop standing still while continuing to hold the space bar if I try to use a skill that I don’t have enough manna to cast.