Fixed problem with cached trees.

The trees didn't set their addresses in the right order while
resuming because of recursive function funkyiness.