tree_entry_interesting(): fix depth limit with overlapping pathspecs