Fix a typo in the documentation
_build_tree_structure: do not reference removed variables
Fix a tiny flake8 complaint