Revert "Separate recursive file search and leaf operations on files"

This reverts commit 72ec3d0b4fffa83c963bae2db2de48489b646d33.

This change broke too many things.