HHH-8563 - javax.persistence.Query#getLockMode should throw ISE in some cases