Added indexing of tree objects with logical and character vector