Merge pull request #3790 from 9rnsr/fix13152

[REG2.064] Issue 13152 - Compiler high cpu usage and never ends