Metallurgy - v4.0.4

Port from 1.6 repo.