Fix regression in handling of 'attachments' result in message_compose hook (#1489627)