Bart swings into trouble when he tries to help the cavalry uncover a traitor and winds up facing a hangman's rope.