Don't regenerate if input files are older than output file (take 2)
Created by: beyang
First commit is what was pushed in #13782, second commit fixes #14039.
Empirically, this improves time-to-user-readiness for enterprise/dev/start.sh
from 40-45s to 32-36s.