Fix for issue #39: No need for an open session to serialize identifiers of proxied entities.