pass data that doesn't change in EncodeState
more compact way to build instances of Struct (sub-)types
fix regressions in r7781