Just created a pullrequest containing both: test case and fix: https://github.com/hibernate/hibernate-orm/pull/1127