This seems to be related to https://hibernate.atlassian.net/browse/HHH-16031, but I am not sure if it is the same cause or not.