fix Issue 12501 - Assertion `global.gaggedErrors || global.errors' failed.
Merge pull request #3414 from 9rnsr/fix12501

[REG2.066a] Issue 12501 - Assertion `global.gaggedErrors || global.errors' failed.
[Refactoring] deferred is necessary only for nested functions in unittests
fix Issue 12498 - ICE: while(string) causes compiler to crash during CTFE
Add assertion to detect internal failure in early stage
Merge pull request #3422 from 9rnsr/fix12498

Issue 12498 - ICE: while(string) causes compiler to crash during CTFE
Merge pull request #3421 from 9rnsr/refactor_glue

[Refactoring] deferred is necessary only for nested functions in unittests