diff --git a/src/orca/scripts/apps/soffice/script_utilities.py b/src/orca/scripts/apps/soffice/script_utilities.py
index 81c7cff..6781f35 100644
--- a/src/orca/scripts/apps/soffice/script_utilities.py
+++ b/src/orca/scripts/apps/soffice/script_utilities.py
@@ -88,6 +88,21 @@ class Utilities(script_utilities.Utilities):
 
         return readOnly
 
+    def isSameObject(self, obj1, obj2):
+        same = script_utilities.Utilities.isSameObject(self, obj1, obj2)
+
+        # Handle the case of false positives in dialog boxes resulting
+        # from getIndexInParent() returning a bogus value. bgo#618790.
+        #
+        if same and (obj1 != obj2) and not obj1.name \
+           and obj1.getRole() == pyatspi.ROLE_TABLE_CELL \
+           and obj1.getIndexInParent() == obj2.getIndexInParent() == -1:
+            top = self.topLevelObject(obj1)
+            if top and top.getRole() == pyatspi.ROLE_DIALOG:
+                same = False
+
+        return same
+
     def frameAndDialog(self, obj):
         """Returns the frame and (possibly) the dialog containing
         the object. Overridden here for presentation of the title
