Improve support for re-running the same build