Fix export of links to attachments (part 2)