Fixing bug when getting resources via criterias and findBy 

To fix https://github.com/Sylius/SyliusResourceBundle/issues/40