Fixing a bug where Doctrine Proxies where not taken under account when calculating the resource class.