Fixed problem rebuilding workspace with closed projects.

Fixes a problem when changing the compiler preferences and starting a full
rebuild of the workspace, in case the workspace contains closed projects.