Use a separate scope for "for" loops.

Refs #6183