Semantics of enhanced for loop differ