Fix sliced IN clauses to be grouped
#36074

kamipo wants to merge kamipo:in_clause_length into rails:master

We do not currently have an analysis of these two commits