                            #(:problems
                              (get % 1))
                            clause-result))}]))))))]
-(let [result
-      (resolve-deps
-        query
-        present-packages
-        {}
-        conflicts
-        (map #(->DecoratedRequirement % :root))
-        requirements)]
-  (if (= :successful (first result))
-    [:successful
-     (list-packages
-      (second result)
-      search-strat)]
-    result)))))
+      (let [result
+            (resolve-deps
+             query
+             present-packages
+             {}
+             conflicts
+             (map #(->DecoratedRequirement % :root) requirements)
+             {})]
+        (if (= :successful (first result))
+          [:successful
+           (list-packages
+            (second result)
+            search-strat)]
+          result)))))

                                               visited
                                               grandchildren-visited)]
                            (if (and (= search-strat :depth-first)
                                     (not (get grandchildren-visited v)))
                              {:pkg-list (conj base-pkg-list v)
                               :visited (conj base-visited v)}
                              {:pkg-list base-pkg-list
                               :visited base-visited})))
                        {:pkg-list []
                         :visited #{}}
                        children)]
                  (if (= search-strat :breadth-first)
                    {:pkg-list (into list-from-children

                                        status)))]
                               (cond
                                 (not
                                  (nil? present-package))
                                 (resolve-deps
                                  repo
                                  present-packages
                                  found-packages
                                  absent-specs
                                  rclauses
                                  (update-in package-graph
                                             [parent]
                                             #(if (empty? %1)
                                                (do [%2])
                                                (conj %1 %2))
                                             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]
                                             #(if (empty? %1)
                                                (do [%2])
                                                (conj %1 %2))
                                             spec)
                                  rclauses
                                  package-graph)
                                 (= status :present)
                                 (let [query-results (repo id)]
                                   (if (empty? query-results)
