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/xpath.c b/src/xpath.c
index 2251eab..0b3062f 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -4042,7 +4042,7 @@
             if (!r) {
                 /* get the target node */
                 target = p[LY_ARRAY_COUNT(p) - 1].node;
-                ly_path_free(p);
+                ly_path_free(set->ctx, p);
 
                 LY_CHECK_RET(lyxp_set_scnode_insert_node(set, target, LYXP_NODE_ELEM, LYXP_AXIS_SELF, NULL));
             } /* else the target was found before but is disabled so it was removed */
@@ -8272,9 +8272,7 @@
         options &= ~LYXP_SKIP_EXPR;
     }
     lydict_remove(set->ctx, ncname_dict);
-    if (predicates) {
-        ly_path_predicates_free(scnode->module->ctx, predicates);
-    }
+    ly_path_predicates_free(set->ctx, predicates);
     return rc;
 }