                                    alternative
                                    present-id-packages
                                    (or (get present-packages id)
-                                                (get found-packages id))
+                                       (get found-packages id))
                                    present-package
                                    (when (not (nil? present-id-packages))
                                      (if (= conflict-strat :prioritized)

                                        status)))]
                               (cond
                                 (not
                                   (nil? present-package))
                                 (resolve-deps
                                   repo
                                   present-packages
                                   found-packages
                                   absent-specs
                                   rclauses
                                   present-package
                                   (update-in package-graph
                                              [parent]
                                              conj
                                              present-package))
                                   (and (not (nil? present-id-packages))
                                        (not (= conflict-strat :inclusive)))
                                   [:unsuccessful
                                    {:problems
                                     [
                                      {:term clause
                                       :found-packages found-packages
                                       :present-packages present-packages
                                       :absent-specs absent-specs
                                       :reason :present-package-conflict
                                       :alternative alternative
                                       :package-id id}]}]
                                 (= status :absent)
                                 (resolve-deps
                                   repo
                                   present-packages
                                   found-packages
                                   (update-in
                                     absent-specs
                                     [id] conj spec)
                                   rclauses
                                   package-graph)
                                 (= status :present)
                                 (let [query-results (repo id)]
                                   (if (empty? query-results)

                                       children))
                     :visited (into visited-from-children children)}
                    children-results)))))]
    (let [{:keys [pkg-list visited]} (list-pkgs-rec #{} :root)]
      pkg-list)))


(defn resolve-dependencies
