schema_helpers BUGFIX circular dependence check
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 52471d9..5415c28 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -929,11 +929,11 @@
} else if (*mod && !revision && ((*mod)->latest_revision & LYS_MOD_LATEST_REV)) {
(*mod)->latest_revision |= LYS_MOD_LATEST_SEARCHDIRS;
}
- } else {
- /* We have module from the current context, circular check. */
- LY_CHECK_RET(lys_check_circular_dependency(ctx, mod));
}
+ /* Checking the circular dependence of imported modules. */
+ LY_CHECK_RET(lys_check_circular_dependency(ctx, mod));
+
return LY_SUCCESS;
}