path BUGFIX creating augmented nodes in ext data

Fixes #2872
diff --git a/src/path.c b/src/path.c
index f9bc994..bceb3ef 100644
--- a/src/path.c
+++ b/src/path.c
@@ -431,7 +431,7 @@
     if (pref) {
         LOG_LOCSET(cur_node, NULL, NULL, NULL);
 
-        mod = ly_resolve_prefix(ctx, pref, len, format, prefix_data);
+        mod = ly_resolve_prefix(prev_ctx_node ? prev_ctx_node->module->ctx : ctx, pref, len, format, prefix_data);
         if ((!mod || !mod->implemented) && prev_ctx_node) {
             /* check for nested ext data */
             ret = ly_nested_ext_schema(NULL, prev_ctx_node, pref, len, format, prefix_data, name, name_len, snode, &e);