[hibernate-issues] [Hibernate-JIRA] (HHH-7644) Correct memory leak introduced by HHH-7557