Issue 10866 - Regression (2.064 git-head) Massive compiler slowdown

http://d.puremagic.com/issues/show_bug.cgi?id=10866

Revert part of the change in commit 805dd761dd85c98d60b3957bd5679cdbbf23c7f2.
Read the detailed comment in code.