Tree optimizer enhancements.