See https://hibernate.atlassian.net/browse/HHH-5222?focusedCommentId=50227&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50227
Pull request: https://github.com/hibernate/hibernate-orm/pull/483
Accidentally pushed 's fix without amending the commit message:
https://github.com/hibernate/hibernate-orm/commit/03daecfe496b880daaea36fc58e6fe3d60528481