Theoretical Study of the Anomalies of Coated Dielectric Gratings