         (if coll
           (let [old-kvs (set (k/extract-key-value-collection key old-record))
                 new-kvs (set (k/extract-key-value-collection key new-record))
-                stale-kvs (filter identity (set/difference new-kvs old-kvs))]
+                stale-kvs (filter identity (set/difference old-kvs new-kvs))]
             (for [kv stale-kvs]
               (release-unique-key session model t uber-key-value kv)))
 

  (combine-responses
   (mapcat
    identity
    (for [t (:lookup-tables model)]
      (let [uber-key (t/uber-key model)
            uber-key-value (t/extract-uber-key-value model record)
            key (:key t)

          new-record
          (:unique-key-tables model)))

(defn update-unique-keys
  "attempts to acquire unique keys for an owner... returns
   a Deferred[Right[[:ok updated-owner-record :failed-keys]]] with an updated
   owner record containing only the keys that could be acquired"
