tree schema BUGFIX always use the main context

Fixes #2240
diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c
index 67cbae6..803009a 100644
--- a/src/tree_schema_common.c
+++ b/src/tree_schema_common.c
@@ -1211,7 +1211,8 @@
                     check_data.name = inc->name;
                     check_data.revision = inc->rev[0] ? inc->rev : NULL;
                     check_data.submoduleof = PARSER_CUR_PMOD(pctx)->mod->name;
-                    lys_parse_submodule(ctx, in, format, pctx, lysp_load_module_check, &check_data, new_mods, &submod);
+                    lys_parse_submodule(ctx, in, format, pctx->main_ctx, lysp_load_module_check, &check_data, new_mods,
+                            &submod);
 
                     /* update inc pointer - parsing another (YANG 1.0) submodule can cause injecting
                      * submodule's include into main module, where it is missing */