Patch for #6602