fix Issue 6652 - 3. Change modifying non ref variable allowed and not affect to loop

http://d.puremagic.com/issues/show_bug.cgi?id=6652