Fixed issue with references to uncompiled model classes due to lazy loading