tree data BUGFIX generating ext data node path
@@ -2401,7 +2401,8 @@ lyd_path_set(const struct ly_set *dnodes, LYD_PATH_TYPE pathtype)
/* 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);
