schema tree REFACTOR pass only new mod set when parsing modules

Parsing and compilation being strictly separate,
pass only new mod set (creating) from unres to
parsing functions to make the distinction explicit.
diff --git a/src/context.c b/src/context.c
index a81e95f..89cb767 100644
--- a/src/context.c
+++ b/src/context.c
@@ -194,8 +194,9 @@
 
     LY_CHECK_ARG_RET(ctx, ctx, name, NULL);
 
-    /* parse */
-    LY_CHECK_GOTO(ret = lys_parse_load(ctx, name, revision, &unres, &result), cleanup);
+    /* load and parse */
+    ret = lys_parse_load(ctx, name, revision, &unres.creating, &mod);
+    LY_CHECK_GOTO(ret, cleanup);
 
     /* implement */
     ret = _lys_set_implemented(mod, features, &unres);
@@ -281,7 +282,7 @@
     /* load internal modules */
     for (i = 0; i < ((options & LY_CTX_NO_YANGLIBRARY) ? (LY_INTERNAL_MODS_COUNT - 2) : LY_INTERNAL_MODS_COUNT); i++) {
         ly_in_memory(in, internal_modules[i].data);
-        LY_CHECK_GOTO(rc = lys_parse_in(ctx, in, internal_modules[i].format, NULL, NULL, &unres, &module), error);
+        LY_CHECK_GOTO(rc = lys_parse_in(ctx, in, internal_modules[i].format, NULL, NULL, &unres.creating, &module), cleanup);
         if (internal_modules[i].implemented || (ctx->flags & LY_CTX_ALL_IMPLEMENTED)) {
             LY_CHECK_GOTO(rc = lys_implement(module, NULL, &unres), error);
         }