Fixed issue when trying to store a proxied entity, allowing for change tracking.