Why language models collapse when trained on recursively generated text