DDC-2931 - Safe comparison between proxies and entities when refreshing objects
DDC-2931 - Removing previous broken fix for DDC-2931 - hardened