When the first build in JIT has an error we are not emitting files. This ends up causing an issue because subsequent builds only trigger partial emits of files and only emits the full set of files if the number of files changed is greater than 20.
This logic adds the behavior that we only enter the 'only 20 files' part when the previous build was successful.
Fixes#14644