So the mission wasn't about Barry of Wally, it was about Bart. Bart's spirit/soul/animating intelligence didn't move to the great beyond, it was secured in the lightning rod Brainy holds on the last page.