Fix recognizing patches vs. attachments.