Diffractive scattering in the Ericson model for the S matrix