We made a fix for this issue on our product. Attached is the pull request for the same.
https://github.com/hibernate/hibernate-orm/pull/2613