The Boy Who Knew Too Much - S5-E20
Continuity mistake: Hans Moleman's clothes change from white to black during the trial. (00:12:05 - 00:13:25)
The Boy Who Knew Too Much - S5-E20
Continuity mistake: The American flag at the judge's right transforms to a plain white flag during the trial. (00:12:50 - 00:13:25)
The Boy Who Knew Too Much - S5-E20
Continuity mistake: During the trial, when Freddy Quimby's lawyer is asking him to come to The Front, the flag to the right of the judge disappears during one shot. (00:13:40)
The Boy Who Knew Too Much - S5-E20
Continuity mistake: When Homer and Bart see each other skipping work/school, Homer is eating a donut then drops it on the pavement when he sees Bart. In the next shot of both of them the donut has disappeared.
Answer: I'm not sure if this is the one you're thinking of, but an episode of "Ray Bradbury Theatre," called "A Sound of Thunder," dealt with a similar matter: a group of hunters travel back in time to hunt dinosaurs, only to find things have changed when they get back because someone stepped on a butterfly.
Xofer