Space-charge oscillations in a self-modulated electron beam in multi-undulator free-electron lasers