 (defn- pull-wildcard
   [db frame frames]
   (let [{:keys [eid pattern]} frame]
-    (if (get-in frame [:recursion :seen eid])
-      (conj frames (update frame :results conj! {:db/id eid}))
-      (pull-wildcard-expand db frame frames eid pattern))))
+    (or (pull-seen-eid frame frames eid)
+        (pull-wildcard-expand db frame frames eid pattern))))
 
 (defn- pull-pattern-frame
   [db [frame & frames]]

           :depth (update depth attr (fnil inc 0))
           :seen (conj seen eid))))

(defn- recursion-result
  [frame]
  (some-> (:kvps frame) persistent! (get ::recursion)))

  (if-let [eids (seq (:eids frame))]
    (let [frame  (reset-frame frame (rest eids) (recursion-result frame))
          eid    (first eids)]
      (or (pull-seen-eid frame frames eid)
          (conj frames frame (recursion-frame frame eid))))
    (let [kvps    (recursion-result frame)
          results (cond-> (:results frame)
                    (seq kvps) (conj! kvps))]
