PHOENIX-1239 IN clause (and some others) cannot get moved from HAVING clause to WHERE clause when qualified