Allow closing trees with selection inside them, but no changes.