Gauge invariance and current algebra in two-dimensional non-Abelian chiral theories