Loop index needs to be var scoped to avoid possible concurrency problems...

Just a minor addition. Nothing to add to the title.