Issue #24583: Fix crash when set is mutated while being updated.
diff --git a/Objects/setobject.c b/Objects/setobject.c
index d962c1e..704d7e2 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -600,7 +600,8 @@
     }
 
     /* We can't assure there are no duplicates, so do normal insertions */
-    for (i = 0; i <= other->mask; i++, other_entry++) {
+    for (i = 0; i <= other->mask; i++) {
+        other_entry = &other->table[i];
         key = other_entry->key;
         if (key != NULL && key != dummy) {
             Py_INCREF(key);