Minor performance optimization when enumerating folders.