Handle duplicate headers (fix #54, #56)