lyb FEATURE thread-safe cached hash generation
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 9cebd2d..b011d8a 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -330,6 +330,9 @@
 
     }
 
+    /* fill cached hashes, if not already */
+    lyb_cache_module_hash(*mod);
+
 cleanup:
     free(mod_name);
     return ret;
@@ -582,7 +585,7 @@
 
     /* compare all the hashes starting from collision ID 0 */
     for (i = 0; i < hash_count; ++i) {
-        sibling_hash = lyb_hash(sibling, i);
+        sibling_hash = lyb_get_hash(sibling, i);
         if (sibling_hash != hash[i]) {
             return 0;
         }