While it hasn't happened to any of my characters in awhile, The work around that usually worked for me was take 1 off the stack, and then place the remainder of the stack onto the 1. (Unless it was a non-stackable item in which case logging in and out sometimes worked.)