Apply vanilla 3.17.0 patches