Fix passing/getting packed structs to/from foreign functions.

Fixes #16574.
nit: line this up with the rest of the arguments