schema MAINTENANCE warnings in release build
diff --git a/src/xpath.c b/src/xpath.c
index 57e0d2d..a4856bc 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -1338,6 +1338,8 @@
     LY_LIST_FOR(root, top_sibling) {
         LYD_TREE_DFS_BEGIN(top_sibling, elem) {
 dfs_search:
+            LYD_TREE_DFS_continue = 0;
+
             if (*prev && !elem) {
                 /* resume previous DFS */
                 elem = LYD_TREE_DFS_next = (struct lyd_node *)*prev;