The Fat and the Furriest - S15-E5
Continuity mistake: When Homer realises that the bear was only agressive because of the electrical tag, they share a bear hug. The back of Homer's shirt is torn to tatters, and his back is bleeding. Immediately thereafter, the back of Homer's shirt is completely intact.
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