schema compile BUGFIXES test refine in uses and fix found issues
diff --git a/src/tree_schema.c b/src/tree_schema.c
index dd085de..9f4b393 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -73,6 +73,11 @@
next = last->next;
repeat:
+ if (next && parent && parent->nodetype == LYS_CASE && next->parent != parent) {
+ /* inside case (as an explicit parent, not when diving into it from choice),
+ * limit the list of children only to the specific case */
+ next = NULL;
+ }
if (!next) {
/* possibly go back to parent */
if (last->parent != parent) {