Given that Hibernate criteria is gonna be abandoned in v6, I think fixing the issue seems not worthwhile, especially given its complexity.