[runtime] Fix support for custom marshallers defined in other assemblies. Fixes #20020.