This reduces the build time somewhat and is particularly noticeable during rebuilds with few code changes. (cherry picked from commit fc3e1337)