Fix compiler error when using non-var initializers in for loops