Use the new `collect_result` parameter to optimize directory imports

Don't collect data for `FileListResult` if it's not used.
8 files changed