Fixing incorrect usage of the Doctrine ODM query builder