fix Issue 10537 - Forward reference error on 'yield' toy example.
Merge pull request #2298 from 9rnsr/fix10537

[REG2.063] Issue 10537 - Forward reference error on 'yield' toy example.