Anomalies of hidden local chiral symmetries in σ-models and extended supergravities