cherrypicked [a8f65f89c0].