In "This Little Wiggy" (Season 9, Episode 18), Marge felt sorry for Lisa's airheaded classmate Ralph Wiggum and attempted to get Bart to play with him. At first, Bart resisted, until he learned that as the police chief's son, Ralph had access to all kinds of troublemaking devices, including a skeleton key that could open any lock in town.
You might recall the ensuing scene where Bart and Ralph snuck into an abandoned prison, using the key to turn on the electric chair. But of course, the kids forgot to turn it off again and when Mayor Quimby paid it a visit, they had to think fast to keep him from getting fried, with Ralph recruiting Lisa to come up with a plan.
In the rough cut, there was a planned intermediate step to the sequence. It would have shown Bart recruiting Homer to think of a plan, as we immediately cut to the three of them on the couch, with Bart deep in thought while the other two stared into space. "There's something wrong with this team we've put together," Bart would observe.
The line's so good that even the show's creators, looking back all these years later, can't believe they cut it. On the DVD audio commentary, writer/producer George Meyer said he quotes that line all the time, observing with regret: "One of my favorite jokes ever in the show, wasn't in the show."