The code was still causing attached HTML files to be inlined. Now anything with a disposition of 'attachment' will be added to the  array rather than inlined.