Fixes #87143 by merging the to-be-persisted entity instead of calling sa...

...veOrUpdate if hibernate's session contains another instance of the entity.