Envoyer la notice par courriel: Gauge invariance and finite counterterms in chiral gauge theories