anchor.diff:  (defun (cas gethash) (old-value new-value key hash-table &optional default)
     (check-type hash-table hash-table)
     (with-hash-table-lock (hash-table)
  -    (when (and (hash-table-gc-invariant hash-table)
  -               (not (object-hash-gc-invariant-under-test key (hash-table-test hash-table))))
  -      (when (eql (hash-table-gc-invariant hash-table) :mandatory)
  -        (error "Hash-table key ~S is not gc-invariant under hash-table test ~S"
  -               key (hash-table-test hash-table)))
  -      ;; Hash table is no longer invariant.
  -      (setf (hash-table-gc-invariant hash-table) nil))
       (when (hash-table-weakness hash-table)
         (return (cas (gethash-weak key hash-table default) old-value new-value)))
       (multiple-value-bind (slot free-slot)
           (find-hash-table-slot key hash-table)
  +      (hash-table-update-gc-invariant hash-table key)
         (cond
           (slot
            ;; Replacing an existing entry
  
positive.code: (defun (setf gethash) (value key hash-table &optional default)
    (check-type hash-table hash-table)
    (with-hash-table-lock (hash-table)
      (when (and (hash-table-gc-invariant hash-table)
                 (not (object-hash-gc-invariant-under-test key (hash-table-test hash-table))))
        (when (eql (hash-table-gc-invariant hash-table) :mandatory)
          (error "Hash-table key ~S is not gc-invariant under hash-table test ~S"
                 key (hash-table-test hash-table)))
        ;; Hash table is no longer invariant.
        (setf (hash-table-gc-invariant hash-table) nil))
      (when (hash-table-weakness hash-table)
        (return (setf (gethash-weak key hash-table default) value)))
      (multiple-value-bind (slot free-slot)
          (find-hash-table-slot key hash-table)
        (cond
          (slot
           ;; Replacing an existing entry
  
negative.code:                  (doit)))
               (doit))))))
  
  (defun hash-table-update-gc-invariant (hash-table key)
    (when (and (hash-table-gc-invariant hash-table)
               (not (object-hash-gc-invariant-under-test key (hash-table-test hash-table))))
      (when (eql (hash-table-gc-invariant hash-table) :mandatory)
        (error "Hash-table key ~S is not gc-invariant under hash-table test ~S"
               key (hash-table-test hash-table)))
      ;; Hash table is no longer invariant.
      (setf (hash-table-gc-invariant hash-table) nil)))
  
  (defun gethash (key hash-table &optional default)
    (check-type hash-table hash-table)
    (with-hash-table-lock (hash-table)
  