Filtering for trait bg equal trees