Other mistake: When Homer throws his beer bottle in the air and puts the gun in his mouth, the beer bottle never lands. (00:15:30)
Character mistake: When Maggie starts speaking Ogdenvillian, Marge says that it is her first word. But in the episode "Gump Roast", everyone, the Simpsons included, all watched a video of Maggie saying her first word. (00:17:35)
Continuity mistake: When the wall is fully built, the people who put the wall up are several feet away from the rest of the people there. In the next shot, everyone is standing together. (00:19:20)
Continuity mistake: When the fence between Springfield and Ogdenville is put up, Marge can be seen in a crowd behind all the people putting the fence up. In the next shot, Marge is next to the crowd of people who put the fence up. (00:19:20)
Continuity mistake: When the police arrive at the gate, Chief Wiggum is in one car and Lou and Eddie are in another car. But in the next shot, Chief Wiggum and Eddie are in the same car. (00:20:00)
Revealing mistake: While Lou is talking to Chief Wiggum about having his belt stuck to a street sign, Lou's mouth disappears for a single frame.
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