 (defn make-achieve-precondition-hla [hierarchy var dst-val]
   (let [name [:achieve-precondition var dst-val]
         av   (action-var var)
-        pc   (util/safe-get-in hierarchy [:precondition-context-map var])]
+        pc   (util/safe-get-in hierarchy [:precondition-context-map var])
+        pc   (:full-context hierarchy)
+        ]
     (reify
       env/Action
        (action-name [a] name)

;; TODO: detect "out-of-context" deadlock, fail immediately.
;; TODO: precond ordering when we activate (handled by activation-actions?)


;  (let [e (make-random-infinite-taxi-sas2 1 2 1 2)] (println (time (run-counted #(uniform-cost-search e)))) (println (time (run-counted #(asplan-solution-pair-name (uniform-cost-search (make-asplan-env e))))))  (println (debug 0 (time (run-counted #(asplan-solution-pair-name (dsh-ucs-inverted (make-asplan-skip-henv e))))))))

; (let [e (make-random-infinite-taxi-sas2 1 2 1 2)] (interactive-hierarchical-search (make-asplan-skip-henv e)))


        ancestor-vars (util/safe-get-in hierarchy [:ancestor-var-map effect-var])
        child-var-map (:child-var-map hierarchy)
        pc            (into #{(action-var effect-var)}
                        (apply concat (map (:fire-action-pc-map hierarchy) (keys reduced-pm))))
;        pc (:full-context hierarchy)
        ]
;    (println "FA" name pc "\n" (clojure.set/difference (:full-context hierarchy) pc))
  (reify
    env/Action
      (action-name [a] name)
