The conditional has been removed because otherwise on trying to reuse the same Tree object when it has been hidden and made visible results in a StaleElementException.