diff --git a/src/GrampsDbUtils/_GedcomUtils.py b/src/GrampsDbUtils/_GedcomUtils.py
index dcc90578a..27e805cb5 100644
--- a/src/GrampsDbUtils/_GedcomUtils.py
+++ b/src/GrampsDbUtils/_GedcomUtils.py
@@ -164,14 +164,17 @@ class IdFinder(object):
 class IdMapper(object):
 
     def __init__(self, trans, find_next, translate):
-        if translate:
-            self.__getitem__ = self.get_translate
-        else:
-            self.__getitem__ = self.no_translate
+        self.translate = translate
         self.trans = trans
         self.find_next = find_next
         self.swap = {}
     
+    def __getitem__(self, gid):
+        if self.translate:
+            return self.get_translate(gid)
+        else:
+            return self.no_translate(gid)
+    
     def clean(self, gid):
         temp = gid.strip()
         if len(temp) > 1 and temp[0] == '@' and temp[-1] == '@':