Fix handling of base64-encoded attachments with extra spaces (#1490111)