initializeCryptoAccount is idempotent method which is called many-times from JS code, and it relies on reading account from storage.
When we run getPrimaryOneTimeKeys or generateAndGetPrekeys at the beginnig to auth with Identity without persisting, then JS could call initializeCryptoAccount which overate state with keys generated, and later when creating inbound session olm throws OLM_BAD_MESSAGE_KEY_ID because init message was created with unknown one-time keys.
Context in ENG-6098.
Depends on D10371