tree data UPDATE find schema ext data support
diff --git a/src/tree_data_common.c b/src/tree_data_common.c
index 105c586..d35914b 100644
--- a/src/tree_data_common.c
+++ b/src/tree_data_common.c
@@ -1074,8 +1074,12 @@
 
         /* search manually without hashes */
         for ( ; siblings; siblings = siblings->next) {
+            /* schema match is enough */
             if (siblings->schema == schema) {
-                /* schema match is enough */
+                break;
+            }
+            if ((LYD_CTX(siblings) != schema->module->ctx) && !strcmp(siblings->schema->name, schema->name) &&
+                    !strcmp(siblings->schema->module->name, schema->module->name)) {
                 break;
             }
         }