avoid persistence of static context: instantiation arguments should provide proper dynamic context (see also e2e2bc1f9570);
--- a/src/Pure/ML/ml_instantiate.ML Fri Oct 29 11:57:49 2021 +0200
+++ b/src/Pure/ML/ml_instantiate.ML Fri Oct 29 11:59:02 2021 +0200
@@ -74,7 +74,7 @@
fun put_thms ths ctxt =
let
val (i, thms) = Data.get ctxt;
- val ctxt' = ctxt |> Data.put (i + 1, Inttab.update (i, ths) thms);
+ val ctxt' = ctxt |> Data.put (i + 1, Inttab.update (i, map Thm.trim_context ths) thms);
in (i, ctxt') end;
fun get_thms ctxt i = the (Inttab.lookup (#2 (Data.get ctxt)) i);