Fixes#34931
This essentially reapplies #24436 which incorrectly updated the generated files rather than the sources, and so was wiped out by 2f73986b44.
Note that this is specifically _not_ the same as #4002, which pertains to the global functions that coerce their arguments and therefore should _not_ accept `unknown`. This change was already accepted 18 months ago, but was applied incorrectly.