CRM-12153 work around unique index constraint when merging tags