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