     (invoke [] (invoke-test this {}))
   TestInvokable
     (invoke-test [active]
-      (try-contexts active contexts states
-        (let [results (map #(invoke-test % active) children)]
-          ;; Force non-lazy evaluation when contexts need closing:
-          (when (some has-after? contexts) (dorun results))
-          (TestResults this results))
-        (catch Throwable t
-          (TestThrown this states t)))))
+      (let [merged (reduce open-context active contexts)]
+        (try 
+         (let [results (map #(invoke-test % merged) children)]
+           ;; Force non-lazy evaluation when contexts need closing:
+           (when (some has-after? contexts) (dorun results))
+           (TestResults this results))
+         (catch Throwable t (TestThrown this nil t))
+         (finally (close-local-contexts contexts merged active))))))
 
 
 ;;; Public API

(deftype ContextualAssertion [contexts pred] :as this
  TestInvokable
    (invoke-test [active]
      (try-contexts active contexts states
        (if (apply pred states)
          (TestPassed this states)
          (TestFailed this states))
        (catch Throwable t
          (TestThrown this states t)))))


;;; Container types

  (or (:after c)
      (some has-after? (:parents c))))

(defn- close-local-contexts [contexts merged active]
  (reduce close-context merged
          ;; Only close contexts that weren't active at start:
          (filter #(not (contains? active %))
                  (reverse contexts))))

;;; Assertion types

