diff --git a/src/tree_data.c b/src/tree_data.c
index b7e695e..b2ecee1 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -678,7 +678,8 @@
             ret = lyd_create_term((struct lysc_node *)keys.keys[i].schema, keys.keys[i].value, strlen(keys.keys[i].value),
                                   NULL, lys_resolve_prefix, NULL, LYD_SCHEMA, &key);
         }
-        LY_CHECK_GOTO(ret, cleanup);
+        LY_CHECK_GOTO(ret && (ret != LY_EINCOMPLETE), cleanup);
+        ret = LY_SUCCESS;
         lyd_insert_node(list, NULL, key);
     }
 
@@ -805,7 +806,8 @@
         key_val = va_arg(ap, const char *);
 
         rc = lyd_create_term(key_s, key_val, key_val ? strlen(key_val) : 0, NULL, lydjson_resolve_prefix, NULL, LYD_JSON, &key);
-        LY_CHECK_GOTO(rc, cleanup);
+        LY_CHECK_GOTO(rc && (rc != LY_EINCOMPLETE), cleanup);
+        rc = LY_SUCCESS;
         lyd_insert_node(ret, NULL, key);
     }
 
@@ -850,6 +852,7 @@
 API struct lyd_node *
 lyd_new_term(struct lyd_node *parent, const struct lys_module *module, const char *name, const char *val_str)
 {
+    LY_ERR rc;
     struct lyd_node *ret = NULL;
     const struct lysc_node *schema;
     struct ly_ctx *ctx = parent ? parent->schema->module->ctx : (module ? module->ctx : NULL);
@@ -863,8 +866,10 @@
     schema = lys_find_child(parent ? parent->schema : NULL, module, name, 0, LYD_NODE_TERM, 0);
     LY_CHECK_ERR_RET(!schema, LOGERR(ctx, LY_EINVAL, "Term node \"%s\" not found.", name), NULL);
 
-    if (!lyd_create_term(schema, val_str, val_str ? strlen(val_str) : 0, NULL, lydjson_resolve_prefix, NULL, LYD_JSON, &ret)
-            && parent) {
+    rc = lyd_create_term(schema, val_str, val_str ? strlen(val_str) : 0, NULL, lydjson_resolve_prefix, NULL, LYD_JSON, &ret);
+    LY_CHECK_RET(rc && (rc != LY_EINCOMPLETE), NULL);
+
+    if (parent) {
         lyd_insert_node(parent, NULL, ret);
     }
     return ret;
@@ -2635,7 +2640,9 @@
         break;
     case LYS_LEAFLIST:
         /* target used attributes: schema, hash, value */
-        LY_CHECK_RET(lyd_create_term(schema, key_or_value, val_len, NULL, lydjson_resolve_prefix, NULL, LYD_JSON, &target));
+        rc = lyd_create_term(schema, key_or_value, val_len, NULL, lydjson_resolve_prefix, NULL, LYD_JSON, &target);
+        LY_CHECK_RET(rc && (rc != LY_EINCOMPLETE), rc);
+        rc = LY_SUCCESS;
         /* fallthrough */
     case LYS_LIST:
         if (schema->nodetype == LYS_LIST) {
