The limited dictionary resolution of the Z-machine means words may collide, e.g. ENGINE and ENGINEER are indistinguishable on V3. Since the dictionary resolution is specified in Z-characters, proper handling requires awareness of the Z-machine's text encoding scheme: e.g. TWENTY-TWO and TWENTY-THREE are indistinguishable on V5 because the hyphen takes up two Z-characters (so both words become TWENTY-T).
ZILF currently fails to account for dictionary collisions, and can produce a VOCAB table containing duplicate entries, leading to unpredictable game behavior (only one will match, but which one depends on the interpreter and/or the other contents of the dictionary).
EmitZap should be aware of the Z-machine text encoding and use that awareness to merge identical words. That awareness would also make it possible to find frequent words in ZILF, rather than always writing a dummy file and leaving the hard work up to ZAPF.