I do not have a Word of God answer from the author, but several other people have suggested the same sequence of events:
In Keys to the Kingdom:
Zack took Bode back to Keyhouse, calling out for Sam Lesser. Zack explained that he would inhabit Bode's body, while Sam could take Zack's. Zack threw Bode through the Ghost Door, before taking Bode's body himself. Sam inhabited Zack's body, but was then killed by Kinsey. Bode, trapped without a body, was unable to communicate with anyone, or warn his family that Dodge was impersonating him.
Tyler went to the Keyhouse after Bode's funeral and followed a sparrow to the Ghost Door through which it flew. Ghost Bode entered the dead sparrow and Tyler used the Animal Key on the well house which fully returned Bode to life.
So, the basic sequence of events (sorry... spoiler blocks don't support lists apparently):
Zack took over Bode's body by virtue of separating his spirit at the Ghost Door. Bode communicated with some sparrows, one of which flew to the Ghost Door and had its spirit split away from its body. Bode inhabited the sparrow's body. Tyler used the Animal Key to change the sparrow's body to that of Bode. The sparrow may forever wander the property as a ghost.