parser FEATURE set of currently parsed modules

... instead of only the last one. It is used
to handle cyclic includes.
diff --git a/src/tree_schema_free.c b/src/tree_schema_free.c
index 3f3d753..eb3c563 100644
--- a/src/tree_schema_free.c
+++ b/src/tree_schema_free.c
@@ -1143,6 +1143,10 @@
             ly_set_erase(&ctx->tpdfs_nodes, NULL);
             ly_set_erase(&ctx->grps_nodes, NULL);
         }
+        ly_set_rm_index(ctx->parsed_mods, ctx->parsed_mods->count - 1, NULL);
+        if (!ctx->parsed_mods->count) {
+            ly_set_free(ctx->parsed_mods, NULL);
+        }
         free(ctx);
     }
 }
@@ -1155,6 +1159,10 @@
             ly_set_erase(&ctx->tpdfs_nodes, NULL);
             ly_set_erase(&ctx->grps_nodes, NULL);
         }
+        ly_set_rm_index(ctx->parsed_mods, ctx->parsed_mods->count - 1, NULL);
+        if (!ctx->parsed_mods->count) {
+            ly_set_free(ctx->parsed_mods, NULL);
+        }
         lyxml_ctx_free(ctx->xmlctx);
         free(ctx);
     }