Also protect racy writes to object files and dependency file