Refine fix to PR10499, no functionality change