I am not familiar with the wiring on a td5,but your symptoms are classic bad/corroded earth contact-look for a wire (black) connected to the body work-clean up contacts- Check light cluster for corrosion and clean accordingly-or run a new earth lead to a good ground,nearby.