xpath FEATURE optional error on non-matching schema xpath
diff --git a/src/tree_schema.c b/src/tree_schema.c
index d456467..9b309f6 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -484,7 +484,7 @@
 
     LY_CHECK_ARG_RET(NULL, ctx || ctx_node, xpath, set, LY_EINVAL);
     if (!(options & LYXP_SCNODE_ALL)) {
-        options = LYXP_SCNODE;
+        options |= LYXP_SCNODE;
     }
     if (!ctx) {
         ctx = ctx_node->module->ctx;