diff --git a/src/schema_compile.c b/src/schema_compile.c
index e622510..cb7bc61 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -1575,7 +1575,7 @@
 lys_compile(struct lys_module *mod, uint32_t options, struct lys_glob_unres *unres)
 {
     struct lysc_ctx ctx = {0};
-    struct lysc_module *mod_c;
+    struct lysc_module *mod_c = NULL;
     struct lysp_module *sp;
     struct lysp_submodule *submod;
     struct lysp_node *pnode;
@@ -1594,18 +1594,6 @@
         return LY_SUCCESS;
     }
 
-    if (!unres->full_compilation) {
-        /* check whether this module may reference any already-compiled modules */
-        if (lys_has_compiled_import_r(mod)) {
-            /* it may and we need even disabled nodes in those modules, recompile them */
-            unres->recompile = 1;
-            return LY_SUCCESS;
-        }
-    }
-
-    /* context will be changed */
-    ++mod->ctx->change_count;
-
     sp = mod->parsed;
 
     ctx.ctx = mod->ctx;
@@ -1616,6 +1604,24 @@
     ctx.path[0] = '/';
     ctx.unres = unres;
 
+    /* augments and deviations */
+    LY_CHECK_GOTO(ret = lys_precompile_augments_deviations(&ctx), cleanup);
+
+    if (!unres->recompile && !unres->full_compilation) {
+        /* check whether this module may reference any already-compiled modules */
+        if (lys_has_compiled_import_r(mod)) {
+            /* it may and we need even disabled nodes in those modules, recompile them */
+            unres->recompile = 1;
+        }
+    }
+
+    if (unres->recompile) {
+        /* we need the context recompiled */
+        goto cleanup;
+    }
+
+    /* now the actual compilation will take place */
+    ++mod->ctx->change_count;
     mod->compiled = mod_c = calloc(1, sizeof *mod_c);
     LY_CHECK_ERR_RET(!mod_c, LOGMEM(mod->ctx), LY_EMEM);
     mod_c->mod = mod;
@@ -1623,14 +1629,6 @@
     /* identities */
     LY_CHECK_GOTO(ret = lys_compile_identities(&ctx), cleanup);
 
-    /* augments and deviations */
-    LY_CHECK_GOTO(ret = lys_precompile_augments_deviations(&ctx), cleanup);
-
-    if (unres->recompile) {
-        /* some augments/deviations may not be possible to apply when the whole compilation may fail */
-        goto cleanup;
-    }
-
     /* compile augments and deviations of our module from other modules so they can be applied during compilation */
     LY_CHECK_GOTO(ret = lys_precompile_own_augments(&ctx), cleanup);
     LY_CHECK_GOTO(ret = lys_precompile_own_deviations(&ctx), cleanup);
