diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx
index f43899eff542d280df62f4698f4e6398820c6e87..9dcc15a44ca519091e804487ccfd3a12dd997df4 100644
--- a/Control/StoreGate/src/SGImplSvc.cxx
+++ b/Control/StoreGate/src/SGImplSvc.cxx
@@ -70,19 +70,11 @@ namespace SG {
   {
     typedef IStringPool::sgkey_t sgkey_t;
 
-    // Hash function for the key.
-    // Just cast the low bits to a size_t.
-    struct keyhash
-    {
-      std::size_t operator() (sgkey_t key) const
-      { return static_cast<std::size_t> (key); }
-    };
-
     struct remap_t {
       sgkey_t target;
       off_t index_offset;
     };
-    typedef std::unordered_map<sgkey_t, remap_t, keyhash> remap_map_t;
+    typedef SGKeyMap<remap_t> remap_map_t;
     remap_map_t m_remaps;
   };
 
diff --git a/Control/StoreGate/test/VarHandleKey_test.cxx b/Control/StoreGate/test/VarHandleKey_test.cxx
index 6fc043eb279fd9f9908f65004b0868ee0b3b0b3f..95c7c390eb34d7fe9644923a0a63f75906e6865a 100644
--- a/Control/StoreGate/test/VarHandleKey_test.cxx
+++ b/Control/StoreGate/test/VarHandleKey_test.cxx
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file StoreGate/test/VarHandleKey_test.cxx
  * @author scott snyder <snyder@bnl.gov>
@@ -14,6 +12,7 @@
 #undef NDEBUG
 #include "StoreGate/VarHandleKey.h"
 #include "StoreGate/exceptions.h"
+#include "SGTools/StringPool.h"
 #include "AthenaKernel/errorcheck.h"
 #include "TestTools/initGaudi.h"
 #include "TestTools/expect_exception.h"
@@ -34,6 +33,8 @@ void test1()
 {
   std::cout << "test1\n";
 
+  SG::StringPool pool;
+
   SG::VarHandleKey k1 (1234, "aaa", Gaudi::DataHandle::Reader);
   assert (k1.clid() == 1234);
   assert (k1.key() == "aaa");
@@ -46,7 +47,7 @@ void test1()
   assert (k1.start().isSuccess());
   assert (!k1.isCondition());
   assert (!k1.empty());
-  assert (k1.hashedKey() == 752331202);
+  assert (k1.hashedKey() == pool.stringToKey ("aaa", 1234));
 
   k1 = "aab";
   assert (k1.clid() == 1234);