[PATCH v2] tpm2-sessions: address out-of-range indexing