ClassTransformer #1438: only open inner substitutions if we're in scope
StatementTransformer #1438: defer the outer substitution name mapping until we enter the for block

Otherwise other statements would see the substitution
Test for #1438: Definitely specified value in for / else block inside an if / else block