[#4955] Better fix for infinite recursion and minor cleanup + comment on TreesDoc attribute error

Signed-off-by: Cory Johns <johnsca@geek.net>
2 files changed