Rayleigh-Taylor instability developing in a layer of matter accelerated by the pressure of magnetic field or of a light fluid is shown to be suppressed if the accelerated layer scoops unperturbed matter, entraining it into motion. This stabilizing mechanism is effective for plasma focus devices, multicascade systems like magneto-cumulative (MC) generators of high-pulsed magnetic fields or multiple gas-puff Z pinches, for impact acceleration of thin foils by high-velocity plasma clouds. Linear stability analysis of one-dimensional solutions of the piston problem demonstrates that perturbation of the given wavelength lambda does not grow appreciably until the thickness of the accelerated layer L(t) exceeds lambda. Before that, if acceleration is increased rapidly enough, amplitudes of the long-wavelength perturbations remain almost constant. If acceleration is increased not too rapidly, stays constant, or is decreased, then the long-wavelength perturbations with lambda > 2L(t) are damped.