Make duplicate detection async.