schema compile BUGFIX augments with mandatory nodes

Allow augments with mandatory nodes when augmenting data in the same
module and if the nodes are status (config false).
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index 6191309..b7454e6 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -3957,7 +3957,7 @@
      * - new cases augmenting some choice can have mandatory nodes
      * - mandatory nodes are allowed only in case the augmentation is made conditional with a when statement
      */
-    if (aug_p->when || target->nodetype == LYS_CHOICE) {
+    if (aug_p->when || target->nodetype == LYS_CHOICE || ctx->mod == target->module) {
         allow_mandatory = 1;
     }
 
@@ -3995,7 +3995,7 @@
             node = lysc_node_children(target)->prev;
         }
 
-        if (!allow_mandatory && (node->flags & LYS_MAND_TRUE)) {
+        if (!allow_mandatory && (node->flags & LYS_CONFIG_W) && (node->flags & LYS_MAND_TRUE)) {
             node->flags &= ~LYS_MAND_TRUE;
             lys_compile_mandatory_parents(target, 0);
             LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SEMANTICS,