GUVNOR-2140: Recursion in ClassFactBuilder leads to StackOverflow when loading in assets into project model cache

(cherry picked from commit b3d55cba88a363dbc2f1b7c3dd5464a63e18a798)