Apply patch for #9918.