Submitted a reproducer here: https://github.com/hibernate/hibernate-orm/pull/6400
And backported to 5.6 just to check: https://github.com/hibernate/hibernate-orm/pull/6401 . I confirm this is a regression, as it worked in 5.6.