Improved foldTiles fix efficiency; there's no need to calculate the offsets anew every time a region is found.

While we're at it, there's no need to keep calculating the tree bounds either.