 (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)))


                     (concat
                      (for [v as] (free-var v))
                      (for [v as] (action-var v))
                      (for [v as, c (cvm v), :when (as c)] (parent-var v c))))]))
        fa-map (into {} 
                 (for [[k as] av-map] 
                   [k 
                    (into as
                     (concat
                      (for [v as] (free-var v))
                      (for [v as] (action-var v))
                      (for [v as, c (cvm v)] (parent-var v c))))]))
        ]
 ;    (println "\n" av-map "\n\n" pc-map)
    (hierarchy-util/make-simple-hierarchical-env 
     env
     [(make-fire-action-hla
