Improve the code of LinkedIdentityMap