Cleanup the stackmap operand folding code and fix a corner case.

I still don't know how to refer to the fixed operands symbolically. I
plan to look into it.