diff --git a/src/validation.c b/src/validation.c
index c59f012..b970622 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -1245,16 +1245,16 @@
  * @brief Validate the whole data subtree.
  *
  * @param[in] root Subtree root.
- * @param[in,out] type_check Set for unres node types.
- * @param[in,out] type_meta_check Set for unres metadata types.
- * @param[in,out] when_check Set for nodes with when conditions.
+ * @param[in,out] node_types Set for unres node types.
+ * @param[in,out] meta_types Set for unres metadata types.
+ * @param[in,out] node_when Set for nodes with when conditions.
  * @param[in] val_opts Validation options, see @ref datavalidationoptions.
  * @param[in,out] diff Validation diff.
  * @return LY_ERR value.
  */
 static LY_ERR
-lyd_validate_subtree(struct lyd_node *root, struct ly_set *type_check, struct ly_set *type_meta_check,
-        struct ly_set *when_check, uint32_t val_opts, struct lyd_node **diff)
+lyd_validate_subtree(struct lyd_node *root, struct ly_set *node_types, struct ly_set *meta_types,
+        struct ly_set *node_when, uint32_t val_opts, struct lyd_node **diff)
 {
     const struct lyd_meta *meta;
     struct lyd_node *node;
@@ -1263,13 +1263,13 @@
         LY_LIST_FOR(node->meta, meta) {
             if (((struct lyext_metadata *)meta->annotation->data)->type->plugin->validate) {
                 /* metadata type resolution */
-                LY_CHECK_RET(ly_set_add(type_meta_check, (void *)meta, 1, NULL));
+                LY_CHECK_RET(ly_set_add(meta_types, (void *)meta, 1, NULL));
             }
         }
 
         if ((node->schema->nodetype & LYD_NODE_TERM) && ((struct lysc_node_leaf *)node->schema)->type->plugin->validate) {
             /* node type resolution */
-            LY_CHECK_RET(ly_set_add(type_check, (void *)node, 1, NULL));
+            LY_CHECK_RET(ly_set_add(node_types, (void *)node, 1, NULL));
         } else if (node->schema->nodetype & LYD_NODE_INNER) {
             /* new node validation, autodelete */
             LY_CHECK_RET(lyd_validate_new(lyd_node_children_p((struct lyd_node *)node), node->schema, NULL, diff));
@@ -1281,7 +1281,7 @@
 
         if (!(node->schema->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && node->schema->when) {
             /* when evaluation */
-            LY_CHECK_RET(ly_set_add(when_check, (void *)node, 1, NULL));
+            LY_CHECK_RET(ly_set_add(node_when, (void *)node, 1, NULL));
         }
 
         LYD_TREE_DFS_END(root, node);
@@ -1308,7 +1308,7 @@
     LY_ERR ret = LY_SUCCESS;
     struct lyd_node *first, *next, **first2;
     const struct lys_module *mod;
-    struct ly_set type_check = {0}, type_meta_check = {0}, when_check = {0};
+    struct ly_set node_types = {0}, meta_types = {0}, node_when = {0};
     uint32_t i = 0;
 
     LY_CHECK_ARG_RET(NULL, tree, *tree || ctx || module, LY_EINVAL);
@@ -1344,12 +1344,12 @@
 
         /* process nested nodes */
         LY_LIST_FOR(*first2, first) {
-            ret = lyd_validate_subtree(first, &type_check, &type_meta_check, &when_check, val_opts, diff);
+            ret = lyd_validate_subtree(iter, &node_types, &meta_types, &node_when, val_opts, diff);
             LY_CHECK_GOTO(ret, cleanup);
         }
 
         /* finish incompletely validated terminal values/attributes and when conditions */
-        ret = lyd_validate_unres(tree, &when_check, &type_check, &type_meta_check, diff);
+        ret = lyd_validate_unres(tree, &node_when, &node_types, &meta_types, diff);
         LY_CHECK_GOTO(ret, cleanup);
 
         /* perform final validation that assumes the data tree is final */
@@ -1358,9 +1358,9 @@
     }
 
 cleanup:
-    ly_set_erase(&type_check, NULL);
-    ly_set_erase(&type_meta_check, NULL);
-    ly_set_erase(&when_check, NULL);
+    ly_set_erase(&node_types, NULL);
+    ly_set_erase(&meta_types, NULL);
+    ly_set_erase(&node_when, NULL);
     return ret;
 }
 
