schema tree CHANGE redesign revision in compiled schema
diff --git a/src/context.c b/src/context.c
index f151a74..f8e2918 100644
--- a/src/context.c
+++ b/src/context.c
@@ -337,12 +337,12 @@
 
     while ((mod = ly_ctx_get_module_by_iter(ctx, key, key_offset, &index))) {
         if (!revision) {
-            if ((mod->compiled && !mod->compiled->revs) || (!mod->compiled && !mod->parsed->revs)) {
+            if ((mod->compiled && !mod->compiled->revision) || (!mod->compiled && !mod->parsed->revs)) {
                 /* found requested module without revision */
                 return mod;
             }
         } else {
-            if ((mod->compiled && mod->compiled->revs && !strcmp(mod->compiled->revs[0].date, revision)) ||
+            if ((mod->compiled && mod->compiled->revision && !strcmp(mod->compiled->revision, revision)) ||
                     (!mod->compiled && mod->parsed->revs && !strcmp(mod->parsed->revs[0].date, revision))) {
                 /* found requested module of the specific revision */
                 return mod;