fix Issue 9254 - ICE on invalid foreach aggregate

ForeachRangeStatement and WhileStatement are basically replaced into ForStatement in semantic phase.
If any error occurs, they will be left as is, however.

Therefor, `assert(0)` in blockExit, usesEH, comeFrom have the potential to be invoked.
Merge pull request #1430 from 9rnsr/fix9254

Issue 9254 - ICE on invalid foreach aggregate