HHH-8454 - Criteria queries sometimes lead to SQL like "... where ? in (?,?)"