schema compile CHANGE support for uses's augments
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 7067701..742b882 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -106,6 +106,13 @@
         /* descendant-schema-nodeid */
         nodeid_type = "descendant";
         context_module = context_node->module;
+
+        if (*id == '/') {
+            LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE,
+                   "Invalid descendant-schema-nodeid value \"%.*s\" - absolute-schema-nodeid used.",
+                   nodeid_len ? nodeid_len : strlen(nodeid), nodeid);
+            return LY_EVALID;
+        }
     } else {
         /* absolute-schema-nodeid */
         nodeid_type = "absolute";
@@ -114,7 +121,7 @@
         if (*id != '/') {
             LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE,
                    "Invalid absolute-schema-nodeid value \"%.*s\" - missing starting \"/\".",
-                   nodeid_len, nodeid);
+                   nodeid_len ? nodeid_len : strlen(nodeid), nodeid);
             return LY_EVALID;
         }
         ++id;
@@ -162,7 +169,7 @@
     } else {
         LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_REFERENCE,
                "Invalid %s-schema-nodeid value \"%.*s\" - unexpected end of expression.",
-               nodeid_type, nodeid_len, nodeid);
+               nodeid_type, nodeid_len ? nodeid_len : strlen(nodeid), nodeid);
     }
 
     return ret;