libyang FEATURE new flags for schema nodes in operations

Fixes #1372
diff --git a/src/tree_data.c b/src/tree_data.c
index 93e3d99..01218b3 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -1485,7 +1485,7 @@
         struct lyd_node **diff)
 {
     LY_ERR ret;
-    const struct lysc_node *iter = NULL, *sp;
+    const struct lysc_node *iter = NULL;
     struct lyd_node *node = NULL;
     struct lyd_value **dflts;
     LY_ARRAY_COUNT_TYPE u;
@@ -1497,13 +1497,6 @@
         sparent = parent->schema;
     }
 
-    for (sp = sparent; sp && !(sp->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)); sp = sp->parent) {}
-    if (sp) {
-        /* these options lose meaning in operations and could cause skipping some nodes
-         * (because LYS_CONFIG* flags are set in the schema nodes with a different meaning) */
-        impl_opts &= ~(LYD_IMPLICIT_NO_STATE | LYD_IMPLICIT_NO_CONFIG);
-    }
-
     getnext_opts = LYS_GETNEXT_WITHCHOICE;
     if (impl_opts & LYD_IMPLICIT_OUTPUT) {
         getnext_opts |= LYS_GETNEXT_OUTPUT;
@@ -1746,7 +1739,7 @@
     }
 
     getnext_opts = 0;
-    if (new_node->schema->flags & LYS_CONFIG_R) {
+    if (new_node->schema->flags & LYS_IS_OUTPUT) {
         getnext_opts = LYS_GETNEXT_OUTPUT;
     }