compiled schema BUGFIX assign extension definition module

Fixes #979
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index e771f6d..add51fe 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -618,6 +618,7 @@
     if (!ctx_sc) {
         context.ctx = ctx;
         context.mod = module;
+        context.mod_def = module;
         context.path_len = 1;
         context.path[0] = '/';
         ctx_sc = &context;