HTTP headers can be duplicated where a single logical header name has multiple values. This is why wasi-http returns a list of header values when you query for a given header name. The SDK papers over this and takes the last value it sees as the only value for the header.
Unfortunately solving this issue would be a breaking change as the SDK exposes this fact to users. For example, here.