Woo hoo! Just managed to get Star Trek The Next Generation Season 5 Episode 26: Time's Arrow Part 1.
The Enterprise has been recalled back to Earth to investigate a temporal anomaly. The detached head of Data has been discovered in a cave, which had not been explored or touched for nearly 5 centuries.
I'll be watching it later after I've finished other chores.