Bug confirmed on 5.0.2.Final. Test case uploaded hhh-5855-master-hibernate-5.0.2.zip.
Updated test case can also be found on github: https://github.com/mpostelnicu/hhh-5855
I can't change the Affects Version myself. Thanks much.