Backport code review suggestion from Joe K