Enhance the multipass build fix started in 2896348ecf05baba92eb5db4abfcecdcd6ffacba