Filtering for trait connection equal trees connected