Reducy risky loop variable usage