Inject variables for the for loop into its scope, not global scope.