Fixed ERRAI-629: EntityManager should treat proxies as identical to the instances they wrap