Continuity mistake: Just before Apu has a flashback of Helen Lovejoy and Moe interacting in the church, Reverend Lovejoy is in his black shirt and collar. after the flashback he is in his casual pink shirt and blue tie.
Continuity mistake: In Apu's van, one of the octuplets on the left is wearing blue pyjamas while the lullaby is playing, then changes to pink pyjamas after Apu takes the disk out.
Revealing mistake: When Homer is riding Barney like a bull at Moe's, there are duplicates of Sam and Larry (the barflies) in the same shot.
Continuity mistake: Just before Apu has a flashback, Reverend Lovejoy is sitting to Apu's left. after the flashback he is sitting to Apu's right.
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