It actually happened with the '70s-'80s show Dallas. An actor whose character had been killed off returned to the show, so they said that season 7 was all a dream.
From a FAQ about the show:
Is it a waste of my time to watch the dream season? Well in many ways yes, it holds no part of the overall plot but there are some wonderful episodes and scenes.I hope Lost doesn't end up taking some easy way out. (Don't tell me--I'm still watching season three!)