validation BUGFIX do not move first pointer
diff --git a/src/validation.c b/src/validation.c
index b970622..f0320f6 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -1306,7 +1306,7 @@
         struct lyd_node **diff)
 {
     LY_ERR ret = LY_SUCCESS;
-    struct lyd_node *first, *next, **first2;
+    struct lyd_node *first, *next, **first2, *iter;
     const struct lys_module *mod;
     struct ly_set node_types = {0}, meta_types = {0}, node_when = {0};
     uint32_t i = 0;
@@ -1343,7 +1343,7 @@
         LY_CHECK_GOTO(ret, cleanup);
 
         /* process nested nodes */
-        LY_LIST_FOR(*first2, first) {
+        LY_LIST_FOR(*first2, iter) {
             ret = lyd_validate_subtree(iter, &node_types, &meta_types, &node_when, val_opts, diff);
             LY_CHECK_GOTO(ret, cleanup);
         }