Java DSL should make copies of the headers in case it is called from a language with immutable collections