tree schema BUGFIX resolve parsed exts for main module only

Submodules may reference the main module and need
to wait for it to be fully parsed before resolving.

Fixes #1943
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 582befb..6b5ff77 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -646,7 +646,7 @@
         return LY_SUCCESS;
     }
 
-    return ly_set_add(&ctx->ext_inst, exts, 1, NULL);
+    return ly_set_add(&ctx->main_ctx->ext_inst, exts, 1, NULL);
 }
 
 /**