dict BUGFIX revert ffeedfdbce0dd98d30cba9738b1800bac483cefb

This optimization exposes another bug that it is not
possible to solve properly without NBC changes so
wait with it until a new SO version.
diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c
index 0faaa3c..dcfb096 100644
--- a/src/tree_schema_common.c
+++ b/src/tree_schema_common.c
@@ -1829,7 +1829,7 @@
 
     /* get the target node */
     target = p[LY_ARRAY_COUNT(p) - 1].node;
-    ly_path_free(p);
+    ly_path_free(node->module->ctx, p);
 
     return target;
 }