Fix loop for-in-sequence bugs

bug22470: Some initializations and types were wrong when the sequence
is a constant.

Change-Id: I64a0332432658386153e9f62c30307bbca5a747d