It is needed because the Attachment ctor creates an iframe so we do not want to run during the replace feature