Dark-energy instabilities induced by gravitational waves