Move where clauses to join conditions.