Lemme see if I can get this right...
Flatworms eat dead coral tissue, kinda like coral exfoliators. Good so far... But in the process of doing that, their wide flat body keeps light from getting to the coral, and they multiply really fast so they're existence will cover and eventually kill a coral.