mail-index: use _REC_AT_SEQ not _MAP_IDX in backward loops [seq-1 .. 0] becomes [seq .. 1]
mail-index: use _REC_AT_SEQ not _MAP_IDX in backward loops
[seq-1 .. 0] becomes [seq .. 1]

Don't pre-decrement, and terminate before you process seq=0.

Signed-off-by: Phil Carmody <e888d2bd6f13f82caa51a37c03d034c76f661ba3@dovecot.fi>

dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot