Refactor #5580: Improve searchFullPathForFilename and comments