Improve indexing on stage_ap_races