Use more specific selector to just get tree nodes

This is increases the test performance.