The decision weakens Rigathi Gachagua's bid for the presidency, although his lawyers have vowed to challenge the ruling.