diff --git a/src/resolve.c b/src/resolve.c
index 342061e..d05e9eb 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -994,7 +994,7 @@
             if (!strncmp(name, node->module->features[j].name, nam_len) && !node->module->features[j].name[nam_len]) {
                 /* check status */
                 if (lyp_check_status(node->flags, lys_node_module(node), node->name, node->module->features[j].flags,
-                                     node->module->features[j].module, node->module->features[j].name, node)) {
+                                     node->module->features[j].module, node->module->features[j].name, NULL)) {
                     return -1;
                 }
                 *feature = &node->module->features[j];
@@ -1008,7 +1008,7 @@
         if (!strncmp(name, module->features[j].name, nam_len) && !module->features[j].name[nam_len]) {
             /* check status */
             if (lyp_check_status(node->flags, lys_node_module(node), node->name, module->features[j].flags,
-                                 module->features[j].module, module->features[j].name, node)) {
+                                 module->features[j].module, module->features[j].name, NULL)) {
                 return -1;
             }
             *feature = &module->features[j];
@@ -1028,7 +1028,7 @@
                 if (lyp_check_status(node->flags, lys_node_module(node), node->name,
                                      module->inc[i].submodule->features[j].flags,
                                      module->inc[i].submodule->features[j].module,
-                                     module->inc[i].submodule->features[j].name, node)) {
+                                     module->inc[i].submodule->features[j].name, NULL)) {
                     return -1;
                 }
                 *feature = &module->inc[i].submodule->features[j];
@@ -4598,12 +4598,8 @@
         }
 
         /* checks done, store the result */
-        ident->base[ident->base_size++] = base;
         *ret = base;
-
-        /* maintain backlinks to the derived identities */
-        return identity_backlink_update(ident, base) ? -1 : EXIT_SUCCESS;
-
+        return EXIT_SUCCESS;
     }
 
     /* base not found (maybe a forward reference) */
@@ -4685,6 +4681,13 @@
         if (lyp_check_status(flags, mod, ident ? ident->name : "of type",
                              (*ret)->flags, (*ret)->module, (*ret)->name, NULL)) {
             rc = -1;
+        } else {
+            if (ident) {
+                ident->base[ident->base_size++] = *ret;
+
+                /* maintain backlinks to the derived identities */
+                rc = identity_backlink_update(ident, *ret) ? -1 : EXIT_SUCCESS;
+            }
         }
     } else if (rc == EXIT_FAILURE) {
         LOGVAL(LYE_INRESOLV, LY_VLOG_NONE, NULL, parent, basename);
