Remove stupidly inefficient code in get_active_contests.