Handle duplicate headers (fix #54, #56)

I dropped support for ignoring duplicate headers, as just incrementing and only reading the first one (and forgetting about the rest) works fine anyway.