The optimization for IN(...) queries combined with OR could result in a strange exception of the type "column x must be included in the group by list".