Cherry-pick a cherry-pick of c0e77168