schema FEATURE allow ignore if-feature statement via compile flag

For the future use when compiling schema trees inside extension
instances (yang-data)
diff --git a/src/schema_compile.h b/src/schema_compile.h
index 15683e0..03935a1 100644
--- a/src/schema_compile.h
+++ b/src/schema_compile.h
@@ -45,6 +45,7 @@
                                                       it will be removed at the end of compilation and should not be
                                                       added to any unres sets. */
 #define LYS_COMPILE_NO_CONFIG       0x04            /**< ignore config statements, neither inherit config value */
+#define LYS_COMPILE_NO_DISABLED     0x08            /**< ignore if-feature statements */
 
 #define LYS_COMPILE_RPC_INPUT       (LYS_IS_INPUT | LYS_COMPILE_NO_CONFIG)  /**< Internal option when compiling schema tree of RPC/action input */
 #define LYS_COMPILE_RPC_OUTPUT      (LYS_IS_OUTPUT | LYS_COMPILE_NO_CONFIG) /**< Internal option when compiling schema tree of RPC/action output */
diff --git a/src/schema_compile_node.c b/src/schema_compile_node.c
index 1b00161..fe87070 100644
--- a/src/schema_compile_node.c
+++ b/src/schema_compile_node.c
@@ -2322,7 +2322,7 @@
 
     /* if-features */
     LY_CHECK_GOTO(ret = lys_eval_iffeatures(ctx->ctx, pnode->iffeatures, &enabled), error);
-    if (!enabled && !(ctx->options & (LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
+    if (!enabled && !(ctx->options & (LYS_COMPILE_NO_DISABLED | LYS_COMPILE_DISABLED | LYS_COMPILE_GROUPING))) {
         ly_set_add(&ctx->disabled, node, 1, NULL);
         ctx->options |= LYS_COMPILE_DISABLED;
     }