schema tree BUGFIX atoms are all traversed nodes
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 588fdd0..b7fb264 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -381,7 +381,9 @@
(*set)->size = xp_set.used;
for (i = 0; i < xp_set.used; ++i) {
- if ((xp_set.val.scnodes[i].type == LYXP_NODE_ELEM) && (xp_set.val.scnodes[i].in_ctx == LYXP_SET_SCNODE_ATOM_CTX)) {
+ if ((xp_set.val.scnodes[i].type == LYXP_NODE_ELEM) && (xp_set.val.scnodes[i].in_ctx >= LYXP_SET_SCNODE_ATOM)) {
+ assert((xp_set.val.scnodes[i].in_ctx == LYXP_SET_SCNODE_ATOM) ||
+ (xp_set.val.scnodes[i].in_ctx == LYXP_SET_SCNODE_ATOM_CTX));
ret = ly_set_add(*set, xp_set.val.scnodes[i].scnode, 1, NULL);
LY_CHECK_GOTO(ret, cleanup);
}