Conditionally create tree_filter

If make_path_hash contains no entries, don’t create a PathFilterGroup.