Properly set up for-loop scoping.