Okay, there is definitely something going on with how CLONE_EFFECT and DELETE_EFFECT deal with global effects. Try something like this on WAND05.itm (Wand of Fire, which has two headers). The idea is to add two opcode 318 effects to the active ability headers (in my case, it is used for adding IWD-style evasion to the wands' targets)
EDIT - dammit, now I cannot reproduce the error. Something about multiple DELETE_EFFECTs being run, followed by multiple ADD_ITEM_EFFECTs, which tripped over the item with two headers. Adding "check_globals = 0" fixed the problem even though the item had no global effects and it should therefore have been superfluous.
Here's another, lesser, concrete example:
COPY_EXISTING ~snakspir.itm~ ~override~
LPF DELETE_EFFECT INT_VAR header_type = 1 END
IF_EXISTS BUT_ONLY
This removes all effects from the item, including global effects, even though specifying "header_type=1" can reasonably be expected to exclude global effects. Specifying the header type is no sufficient to limit the function to effects in a specific header type; it only works correctly if you add "check_globals=0." This is a fine and easy workaround now that I know about it; but based on the Weidu documentation I would not expect it to be necessary.