Fixing bug in build system noticed by Jeff. This should improve the performance of default builds