FIX: Prevent UniqueViolation exceptions when syncing group mentions (PR #12543)

GitHub