Other mistake: The doctor in the insane asylum shows a video that shows a child Ned Flanders from 30 years ago. Ned is 60.
Other mistake: When Ned Flanders is calling Marge and Reverend Lovejoy from the Leftorium, he says that the three hooligans are in the shop on their motorbikes. But a few minutes before when Ned goes outside the shop to tell the boys to clear off, their bikes are nowhere in sight.
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