   cljs.core/IDeref
   (-deref [this]
     (when-let [invalidate *invalidate-rx*]
-      (-add-watch this invalidate invalidate)
+      ;(-add-watch this (.-id invalidate) invalidate)
+      (.addSwatch this (.-id invalidate)
+                  (fn [key ref _ _]
+                    (.removeSwatch ref key)
+                    (invalidate)))
       (when *trace-capture* (*trace-capture* this)))
     state)
 

            (when-not (nil? validate)
              (assert (validate new-value) "Validator rejected reference state")))
          (set! (.-state a) new-value)
          (when-not (empty? (.-watches a))
            (-notify-watches a old-value new-value)))
        new-value))

  ISwap


  IWatchable
  (-notify-watches [this oldval newval]
    (.notifySwatches this oldval newval))
  (-add-watch [this key f]
    (set! (.-watches this) (assoc watches key f))
    this)
