Use correct titles for tags in attachments, fixes #854