cherry-pick another upstream fix