Quenching of the current-driven ion-wave instability in the trapped-electron regime in a toroidal plasma