test for @id in tree