data tree CHANGE new flag for copying nodes with when state
diff --git a/src/tree_data.h b/src/tree_data.h
index 3e5f7f7..5cc326b 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -909,6 +909,10 @@
                                            Keys are also duplicated for lists. Return value does not change! */
 #define LYD_DUP_OPT_WITH_KEYS    0x08 /**< If a lits key is being duplicated non-recursively, duplicate its keys.
                                            Ignored if used with #LYD_DUP_OPT_RECURSIVE. Return value does not change! */
+#define LYD_DUP_OPT_WITH_WHEN    0x10 /**< Also copy any when evaluation state flags. This is useful in case the copied
+                                           nodes are actually still part of the same datastore meaning no dependency data
+                                           could have changed. Otherwise nothing is assumed about the copied node when
+                                           state and it is evaluated from scratch during validation. */
 
 /** @} dupoptions */