Tree-thinking pass.