A second-generation planet, composed of the remains of a dead star, has been discovered orbiting a white dwarf for the first time.