Improved the LSHIFT/RSHIFT distinction.

Got a new answer on stackoverflow. :)