It was mixing UIDs and sequences, so a wrong mail could have been set
corrupted or it could have crashed with:
Panic: file mail-index-transaction-update.c: line 1018 (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq))
va_start(va, fmt);
T_BEGIN {
- mail_cache_set_seq_corrupted_reason(cache_view, mail->uid,
+ mail_cache_set_seq_corrupted_reason(cache_view, mail->seq,
t_strdup_printf("UID %u: %s",
mail->uid,
t_strdup_vprintf(fmt, va)));