Index: /trunk/source/lisp-kernel/x86-gc.c
===================================================================
--- /trunk/source/lisp-kernel/x86-gc.c	(revision 13005)
+++ /trunk/source/lisp-kernel/x86-gc.c	(revision 13006)
@@ -2813,10 +2813,12 @@
  */
 
-static inline void
+static inline int
 wp_maybe_update(LispObj *p, LispObj old, LispObj new)
 {
   if (*p == old) {
     *p = new;
-  }
+    return true;
+  }
+  return false;
 }
 
@@ -2848,5 +2850,4 @@
     } else if (nodeheader_tag_p(tag_n)) {
       nwords = header_element_count(node);
-      
       nwords += 1 - (nwords & 1);
 
@@ -2859,5 +2860,5 @@
         nwords -= skip;
         while(skip--) {
-	  if (*p == old) *p = new;
+	  wp_maybe_update(p, old, new);
           p++;
         }
@@ -2868,11 +2869,10 @@
         nwords >>= 1;
         while(nwords--) {
-          if (*p == old && hashp) {
-	    *p = new;
+          if (wp_maybe_update(p, old, new) && hashp) {
             hashp->flags |= nhash_key_moved_mask;
             hashp = NULL;
           }
           p++;
-	  if (*p == old) *p = new;
+	  wp_maybe_update(p, old, new);
           p++;
         }
