Regression fix: wrong export of attachments