Imported fix for #100609