RT #102650: scoping bug in statement-modifying for-loops