parser FEATURE parsing validated data with true when
diff --git a/src/parser_common.c b/src/parser_common.c
index a5daeb7..cd32300 100644
--- a/src/parser_common.c
+++ b/src/parser_common.c
@@ -247,6 +247,10 @@
     struct lyd_ctx_ext_val *ext_val;
 
     if (lysc_has_when(node->schema)) {
+        if (lydctx->parse_opts & LYD_PARSE_WHEN_TRUE) {
+            /* the condition was true before */
+            node->flags |= LYD_WHEN_TRUE;
+        }
         if (!(lydctx->parse_opts & LYD_PARSE_ONLY)) {
             /* remember we need to evaluate this node's when */
             LY_CHECK_RET(ly_set_add(&lydctx->node_when, node, 1, NULL));