Backport 92354e254db078ff68dfabc8facd5c43f1173827