PLAT-6665 InMemorySecurityMaster replace() fails if UniqueId missing