Updated patch to trunk r36241