Ignore hidden files when building the internal cache (see #7098)