org.hibernate.loader.ast.internal.CollectionLoaderBatchKey#batchLoad should maybe try to cache the SQL it translates.
In a throughput test, this was identified as causing perf issues compared to 5.