tree data BUGFIX generating ext data node path
diff --git a/src/tree_data.c b/src/tree_data.c
index 7ab2607..a082d8a 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -2401,7 +2401,8 @@
 
             /* parent */
             parent = (depth > 1) ? dnodes->dnodes[depth - 2] : NULL;
-            assert(!parent || !iter->schema || !parent->schema || (lysc_data_parent(iter->schema) == parent->schema));
+            assert(!parent || !iter->schema || !parent->schema || (lysc_data_parent(iter->schema) == parent->schema) ||
+                    (!lysc_data_parent(iter->schema) && (LYD_CTX(iter) != LYD_CTX(parent))));
 
             /* get module to print, if any */
             prev_mod = (parent && parent->schema) ? parent->schema->module : lyd_owner_module(parent);