Deduplicate deindexing routine.