HHH-8647 - hibernate.cache.use_reference_entries + queries