           ;; Active precondition -- assigned, needs its value changed, not deadlock               
           (util/find-first #(and (env/get-var s (parent-var % effect-var))
                                  (not (= (env/get-var s %) (reduced-pm %)))
-                                 (not (contains? deadlock-set %)))
+                                 (not (precond-deadlocked? s % effect-var)))
                            (keys reduced-pm))
-            [[(make-achieve-precondition-hla hierarchy x (reduced-pm x))
-              (make-if-deadlock-hla hierarchy x 
-                [(make-fire-action-hla hierarchy effect-var a (conj deadlock-set x) reduced-pm pc)]
-                [(make-fire-action-hla hierarchy effect-var a #{} reduced-pm pc)])]]
+            [[(make-achieve-precondition-hla hierarchy x (reduced-pm x)) this]]
 
           ;; Inactive precondition -- needs to be assigned.  
           (util/find-first #(env/get-var s (free-var %)) (keys reduced-pm))

          ;; Nothing to do here -- return upwards, or fail if goal-var
          :else
            (when-not (= effect-var sas/goal-var-name) [[]]))))
       (cycle-level-           [s] nil)))))




         (cond (= (env/get-var s var) dst-val)
                 (do (assert (not (env/get-var s av))) [[]])
               (env/get-var s av)
                 [[(make-fire-action-hla hierarchy var (env/get-var s av)) 
                   (make-if-deadlock-hla hierarchy var [] [this])]]
               :else 
                 (let [p-val (env/get-var s var)
