xpath BUGFIX evaluation of * on schema

All modules of the nodes must match.
Refs #1780
diff --git a/src/xpath.c b/src/xpath.c
index 6001949..8afebb3 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -5472,7 +5472,7 @@
 moveto_scnode_check(const struct lysc_node *node, const struct lysc_node *ctx_scnode, const struct lyxp_set *set,
         const char *node_name, const struct lys_module *moveto_mod)
 {
-    if (!moveto_mod && (!node_name || strcmp(node_name, "*"))) {
+    if (!moveto_mod && node_name && strcmp(node_name, "*")) {
         switch (set->format) {
         case LY_VALUE_SCHEMA:
         case LY_VALUE_SCHEMA_RESOLVED: