schema compile BUGFIX missing module info in comple context when precompiling features
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index 4dcb90b..8dfd885 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -425,6 +425,8 @@
     LY_ARRAY_COUNT_TYPE u;
     struct lysc_feature *f, *flist;
 
+    assert(mod);
+
     for (i = 0; i < len; ++i) {
         if (name[i] == ':') {
             /* we have a prefixed feature */
@@ -960,6 +962,7 @@
     if (!ctx_sc) {
         context.ctx = ctx;
         context.mod = module;
+        context.mod_def = module;
         context.path_len = 1;
         context.path[0] = '/';
         ctx_sc = &context;