Bug is no longer actual. The code was refactored by this commit https://github.com/hibernate/hibernate-orm/commit/17de173cb5334d866f1886d3e057f49a6c987bad