This fixes a regression introduced in GH-135930. (cherry picked from commit dee6501894) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
dee6501894