The div that is replaced with the existing.attachments template was not the right target and kept nesting div into each other. The parent div of the existing.attachments now has the o_we_existing_attachments class (the target to be replaced by itself). Part of #33983