tree: test for #8

regression test for #8