Fixed bug in constant generation.

The constant value was not being moved into the appropriate shift location in
some cases. Causing random constants to appear.