     (loop [q (seq query) ret data]
       (if-not (nil? q)
         (let [expr (first q)]
-          (if (join? expr)
-            (let [[k sel] (join-entry expr)
-                  recursive? (recursion? sel)
-                  union-entry (if (union? expr) sel union-seen)
+          (if (util/join? expr)
+            (let [[k sel] (util/join-entry expr)
+                  recursive? (util/recursion? sel)
+                  union-entry (if (util/union? expr) sel union-seen)
                   sel     (if recursive?
                             (if-not (nil? union-seen)
                               union-seen

    (seq? expr)     (let [expr' (first expr)]
                      (when (map? expr')
                        (ffirst expr')))
    (ident? expr)   (cond-> expr (= '_ (second expr)) first)
    :else
    (throw
      (ex-info (str "Invalid query expr " expr)

   (if (and (or (= bound '*)
                (and (not= path bound)
                     (< (count path) (count bound))))
            (some util/join? focus)
            (== 1 (count focus)))
     (let [[k focus'] (util/join-entry (first focus))
           k (if (util/ident? k) (first k) k)
           focus'     (if (util/recursion? focus')
                        focus
                        focus')]
       (recur focus' bound (conj path k)))
