HHH-8769 - 4.2 branch - Regression test

https://hibernate.atlassian.net/browse/HHH-8769