Doctrine 1

Using WITH in combinations with LIMIT returns unexpected results