Replace WeakIdentityHashMap with IdentityWrapper