Submacropulse electron-beam dynamics correlated with higher-order modes in a Tesla-type cryomodule