Treehouse Of Horror XVI - S17-E4
Continuity mistake: At the end of "B.I.: Bartificial Intelligence," Homer climbs onto the ceiling and turns his head in a parody of "The Exorcist." He then lets go and lands on the bed. The only problem is that his body landing doesn't match the position it would from what we see on the ceiling. If he dropped down his face should be face down, body facing up and his head would be closer to the end of the bed. When he lands, his head is near the pillows, his body facing down and his head facing up.
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