diff --git a/src/exdf/write/sd_writer.py b/src/exdf/write/sd_writer.py
index 1f7b3bcf8ac60b3f5660e8d756a27a2ca979ca52..0aa0ab6393dc57ba74ef6b4b84f55b53388b7623 100644
--- a/src/exdf/write/sd_writer.py
+++ b/src/exdf/write/sd_writer.py
@@ -357,9 +357,9 @@ def get_key_attributes(sd):
                             if isinstance(v1, np.ndarray)
                             else v1 == v2
                         )
-                        for v1, v2
-                        in zip(existing_attrs.values(), path_attrs.values())
-                    ])
+                        for (k, v1), v2
+                        in zip(existing_attrs.items(), path_attrs.values())
+                        if k != 'tableSize'])
 
                     if not same_keys or not same_values:
                         log.debug(f'Attributes for {sd.source}.{path} in '