Use mail_index_ext_get_reset_id() to get the current reset_id, so we get the correct one in case it has been updated for current transaction already. Also fixes an assert-crash in case the cache extension didn't yet even exist outside the transaction.
Use mail_index_ext_get_reset_id() to get the current reset_id, so we get the
correct one in case it has been updated for current transaction already.
Also fixes an assert-crash in case the cache extension didn't yet even exist
outside the transaction.

LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot