Avoid redundancy in subdir traversal