Theoretical Analysis of Second-Order Effects in Surface-Wave Gratings