Apply shouldTrackCollection to Tree and improve tests