[hibernate-dev] 5.1 branch backporting