Verified that this affects 5.0, and a PR was submitted with a possible fix.
https://github.com/hibernate/hibernate-orm/pull/3073