Cherry picked b00ce96ecf8a8b67ba99f16ae58d907ce47dad75 from 2-0-stable