Looks like the resolved bug HHH-7683 was missed to take over into version 4.xxx.
At least in 4.2.0.Final i can reproduce this bug and I was able to fix the issue with the provided code by Tomasz Dziurko so i suppose his code is still valid for 4.2.0
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira