compile schema FEATURE store cur mod for leafrefs

Because they may differ from the node itself.
Test with deviation included.
diff --git a/src/schema_compile.c b/src/schema_compile.c
index 70e423e..17f3158 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -1091,7 +1091,7 @@
     assert(node->nodetype & (LYS_LEAF | LYS_LEAFLIST));
 
     /* try to find the target */
-    LY_CHECK_RET(ly_path_compile(ctx->ctx, node->module, node, lref->path, LY_PATH_LREF_TRUE, lysc_is_output(node) ?
+    LY_CHECK_RET(ly_path_compile(ctx->ctx, lref->cur_mod, node, lref->path, LY_PATH_LREF_TRUE, lysc_is_output(node) ?
             LY_PATH_OPER_OUTPUT : LY_PATH_OPER_INPUT, LY_PATH_TARGET_MANY, LY_PREF_SCHEMA_RESOLVED, lref->prefixes,
             unres, &p));