Fix a new C-style cast `clang-tidy` error in #3963. (#3965)
This isn't *technically* a C-style cast, but a function-style cast. And
newer versions of `clang-tidy` no longer fire on this code, so it is a
little sad to have to work around. But the version on our build bots
seems old enough to still hit this issue (and possibly some others).
Our merge queue also doesn't seem to catch these reliably, but that's
for a separate PR.