Independents must be allowed to stand in elections, top court rules