diff --git a/src/tree_data.c b/src/tree_data.c
index 410eebd..cc1ad2e 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -1853,7 +1853,7 @@
         uint32_t options, struct lyd_node **dup_parent, struct lyd_node **local_parent)
 {
     const struct lyd_node *orig_parent;
-    struct lyd_node *iter;
+    struct lyd_node *iter = NULL;
     ly_bool repeat = 1, ext_parent = 0;
 
     *dup_parent = NULL;
@@ -1879,17 +1879,21 @@
         } else {
             iter = NULL;
             LY_CHECK_RET(lyd_dup_r(orig_parent, trg_ctx, NULL, 0, &iter, options, &iter));
+
+            /* insert into the previous duplicated parent */
+            if (*dup_parent) {
+                lyd_insert_node(iter, NULL, *dup_parent, 0);
+            }
+
+            /* update the last duplicated parent */
+            *dup_parent = iter;
         }
 
+        /* set the first parent */
         if (!*local_parent) {
-            /* update local parent (created parent) */
             *local_parent = iter;
         }
 
-        if (*dup_parent) {
-            lyd_insert_node(iter, NULL, *dup_parent, 0);
-        }
-        *dup_parent = iter;
         if (orig_parent->flags & LYD_EXT) {
             ext_parent = 1;
         }
@@ -1902,6 +1906,10 @@
         return LY_EINVAL;
     }
 
+    if (*dup_parent && parent) {
+        /* last insert into a prevously-existing parent */
+        lyd_insert_node(parent, NULL, *dup_parent, 0);
+    }
     return LY_SUCCESS;
 }
 
diff --git a/tests/utests/data/test_tree_data.c b/tests/utests/data/test_tree_data.c
index 462913b..494fdf3 100644
--- a/tests/utests/data/test_tree_data.c
+++ b/tests/utests/data/test_tree_data.c
@@ -337,8 +337,7 @@
 
     data = "<l2 xmlns=\"urn:tests:a\"><c><x>b</x></c></l2>";
     CHECK_PARSE_LYD(data, 0, LYD_VALIDATE_PRESENT, tree1);
-    assert_int_equal(LY_SUCCESS, lyd_dup_single(((struct lyd_node_inner *)((struct lyd_node_inner *)tree1->next)->child)->child, NULL,
-            LYD_DUP_WITH_PARENTS, &tree2));
+    assert_int_equal(LY_SUCCESS, lyd_dup_single(lyd_child(lyd_child(tree1->next)), NULL, LYD_DUP_WITH_PARENTS, &tree2));
     int unsigned flag = LYS_CONFIG_R | LYS_SET_ENUM;
 
     CHECK_LYSC_NODE(tree2->schema, NULL, 0, flag, 1, "x", 1, LYS_LEAF, 1, 0, NULL, 0);
@@ -360,8 +359,8 @@
     data = "<l2 xmlns=\"urn:tests:a\"><c><x>b</x></c></l2>";
     CHECK_PARSE_LYD(data, 0, LYD_VALIDATE_PRESENT, tree1);
     assert_int_equal(LY_SUCCESS, lyd_dup_single(tree1->next, NULL, 0, &tree2));
-    assert_int_equal(LY_SUCCESS, lyd_dup_single(((struct lyd_node_inner *)((struct lyd_node_inner *)tree1->next)->child)->child,
-            (struct lyd_node_inner *)tree2, LYD_DUP_WITH_PARENTS, NULL));
+    assert_int_equal(LY_SUCCESS, lyd_dup_single(lyd_child(lyd_child(tree1->next)), (struct lyd_node_inner *)tree2,
+            LYD_DUP_WITH_PARENTS, NULL));
     assert_int_equal(LY_SUCCESS, lyd_compare_single(tree1->next, tree2, LYD_COMPARE_FULL_RECURSION));
     lyd_free_all(tree1);
     lyd_free_all(tree2);
