Fix for certain outer join clauses