data tree NEW functions for searching in siblings

... using hashes if possible. Other refactoring
included.
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 4bf97aa..3fd214a 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -108,7 +108,7 @@
             current_nodetype = LYS_INOUT;
         } else {
 getnext:
-            context_node = lys_child(context_node, mod, name, name_len, 0,
+            context_node = lys_find_child(context_node, mod, name, name_len, 0,
                                      getnext_extra_flag | LYS_GETNEXT_NOSTATECHECK | LYS_GETNEXT_WITHCHOICE | LYS_GETNEXT_WITHCASE);
             if (!context_node) {
                 LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE,