Add optimizations for more efficient handling of special folder icons.