plugins types BUGFIX check module is implemented using the flag

The compiled module may temporarily not exist
because it is being recompiled.
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 7df93a2..4c4e814 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -1431,7 +1431,7 @@
         /* no match */
         rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity not found.", (int)value_len, value);
         goto error;
-    } else if (!mod->compiled) {
+    } else if (!mod->implemented) {
         /* non-implemented module */
         rc = asprintf(&errmsg, "Invalid identityref \"%.*s\" value - identity found in non-implemented module \"%s\".",
                 (int)value_len, value, mod->name);
diff --git a/src/tree_schema.c b/src/tree_schema.c
index e81e77d..98c9e5b 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -498,9 +498,8 @@
         all = 1;
     }
 
-    if (!mod->compiled) {
-        LOGERR(ctx, LY_EINVAL, "Module \"%s\" is not implemented so all its features are permanently disabled without a chance to change it.",
-                mod->name);
+    if (!mod->implemented) {
+        LOGERR(ctx, LY_EINVAL, "Module \"%s\" is not implemented so all its features are permanently disabled.", mod->name);
         return LY_EINVAL;
     }
     if (!mod->features) {
@@ -538,9 +537,8 @@
                                 ++disabled_count;
                                 goto next;
                             } else {
-                                LOGERR(ctx, LY_EDENIED,
-                                        "Feature \"%s\" cannot be enabled since it is disabled by its if-feature condition(s).",
-                                        f->name);
+                                LOGERR(ctx, LY_EDENIED, "Feature \"%s\" cannot be enabled since it is disabled by "
+                                        "its if-feature condition(s).", f->name);
                                 ret = LY_EDENIED;
                                 goto cleanup;
                             }
@@ -579,9 +577,8 @@
             /* ... print errors */
             for (u = 0; disabled_count && u < LY_ARRAY_COUNT(mod->features); ++u) {
                 if (!(mod->features[u].flags & LYS_FENABLED)) {
-                    LOGERR(ctx, LY_EDENIED,
-                            "Feature \"%s\" cannot be enabled since it is disabled by its if-feature condition(s).",
-                            mod->features[u].name);
+                    LOGERR(ctx, LY_EDENIED, "Feature \"%s\" cannot be enabled since it is disabled by its if-feature "
+                            "condition(s).", mod->features[u].name);
                     --disabled_count;
                 }
             }
diff --git a/tests/utests/schema/test_tree_schema_compile.c b/tests/utests/schema/test_tree_schema_compile.c
index 6e758ab..3bf732a 100644
--- a/tests/utests/schema/test_tree_schema_compile.c
+++ b/tests/utests/schema/test_tree_schema_compile.c
@@ -2280,7 +2280,7 @@
     assert_int_equal(1, LY_ARRAY_COUNT(child->iffeatures[0].features));
     assert_string_equal("f", child->iffeatures[0].features[0]->name);
     assert_int_equal(LY_EINVAL, lys_feature_enable(mod->parsed->imports[0].module, "f"));
-    logbuf_assert("Module \"grp\" is not implemented so all its features are permanently disabled without a chance to change it.");
+    logbuf_assert("Module \"grp\" is not implemented so all its features are permanently disabled.");
     assert_int_equal(LY_ENOT, lysc_iffeature_value(&child->iffeatures[0]));
 
     /* make the imported module implemented and enable the feature */