Fix crash when deleting multiple emails, due to begin+idx being out of bounds.
Reviewed by Dan Vratil.