The odkim.del_header(ctx, name, n) function offered for use in Lua final script is broken:
it always deletes the first instance of the provided header instead of the nth one.
The attached patch is a fix proposal.
opendkim_dkimf_xs_delheader_patch.txt