Hehe. Quick and dirty test with your two sets, damned.
Here I'm changing the name before calling the 5E addNPC, and hence before the core addNPC, so the numbering still works for unsupported types (just checking for humanoid).
That also means there could be two two Duergar with elegant eyepatches. Rivals in respectable and sophisticated entrepreneurship :D
Attachment 14144