compile time optimized from 217 to 3 seconds

test pc:
cpu: intel i7 3.5Ghz 16GB ram, raid 10.

compile time in my small project with only 137 dependencies:
before fix: 217 seconds (unacceptable)
after fix: 3 seconds