compile BUGFIX extension instances compilation

In case of YIN input and the extension defined in the same module, the
extension instance's prefix was incorectly processed and the schema
module was never found.
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index c393f4e..3c8b843 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -538,7 +538,7 @@
     lysc_update_path(ctx, NULL, prefixed_name);
 
     if (!ext_mod) {
-        ext_mod = lys_module_find_prefix(ctx->mod_def, prefixed_name, u - 1);
+        ext_mod = u ? lys_module_find_prefix(ctx->mod_def, prefixed_name, u - 1) : ctx->mod_def;
         if (!ext_mod) {
             LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE,
                 "Invalid prefix \"%.*s\" used for extension instance identifier.", u, prefixed_name);