The Simpsons have pulled off some impressively ambitious jokes before, but one of the show’s longest setups is one that many fans might have missed on first viewing. In its 30 years on the air, The Simpsons has been known to put some truly impressive work into a one-off joke. The anarchic animated sitcom even once managed to get iconic recluse Thomas Pynchon to come out of hiding for a hilarious cameo.

But some of The Simpsons’ most impressive gags required years of planning all for the sake of a deadpan punchline. Even though The Simpsons regularly disregards canon, on occasion the series can play off a gag seasons after it is initially set up. Take, for example, a throwaway joke in one season 9 outing, which has its secret origins in an episode of The Simpsons that aired over a year earlier in season 8.

Related: The Simpsons Released 3 Christmas Episodes In One Year

At the end of season 9’s 'Das Bus' (the one where the kids of Springfield recreate Lord of the Flies after being stranded on a desert island), James Earl Jones’ narrator appears to realize that the story has left no time for a solution as to how the kids eventually escaped the island. When the action is wrapped up, Nelson, Bart, Milhouse, and co are feasting on boar meat (or in Lisa’s case, algae), but the episode has left the group still stranded on an island far from their hometown. To tie up proceedings neatly and keep the show’s status quo, the quick-thinking narrator ends the episode by saying they were saved by “oh, let’s say… Moe.

Das Bus

The abrupt ending has no grounding in the episode’s action, and Moe hasn’t even played a part in the outing until this line. As such, initially, the gag seems to be that the narrator is blatantly making up the episode’s story as he goes along, and the line can be read as a tacit confession by The Simpsons writer’s room that they collectively had no idea how else to end the episode. Only that’s not quite the whole story, something that fans of the series will have already realized if they’re paying (way too much) attention.

Eagle-eyed fans of The Simpsons will recall that over an entire season earlier in season 8 episode 3’s 'The Homer They Fall,' Moe ended his short-lived stint as a boxing promoter by stealing a paramotor and swooping into the ring to save Homer from Drederick Tatum. Like many Simpsons outings, the ending of that episode is presumed to take place outside of the show’s canon, as it sees Moe flying off to help people in need the world over with his paramotor. However, if viewers assume that both this moment and 'Das Bus' take place in the same continuity, then one can reasonably guess that this international do-goodery eventually led to Moe and his paramotor saving the kids of Springfield from a desert island. Now if only The Simpsons could provide such a clear explanation for why so many of its characters return from the dead.

More: Westworld: How The Simpsons Episode Compares To The Sci-Fi Classic