Councillors reinstated after court ruling