Ensure the module is initialized in key based functions
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 01dbf3c..8aa3145 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -347,6 +347,8 @@
 static psa_status_t psa_get_key_slot( psa_key_slot_t key,
                                       key_slot_t **p_slot )
 {
+    GUARD_MODULE_INITIALIZED;
+
     /* 0 is not a valid slot number under any circumstance. This
      * implementation provides slots number 1 to N where N is the
      * number of available slots. */