--- a/src/Pure/PIDE/command.ML	Tue May 13 09:21:22 2014 +0200
+++ b/src/Pure/PIDE/command.ML	Tue May 13 10:15:50 2014 +0200
@@ -198,10 +198,8 @@
   let
     val name = Toplevel.name_of tr;
     val res =
-      if Keyword.is_theory name andalso not (Keyword.is_theory_begin name) then
-        Toplevel.reset_theory st0
-      else if Keyword.is_proof name then
-        Toplevel.reset_proof st0
+      if Keyword.is_theory_body name then Toplevel.reset_theory st0
+      else if Keyword.is_proof name then Toplevel.reset_proof st0
       else NONE;
   in
     (case res of