Fix for infinite loop when trying to decode multi-part mime attachments