This happened to me a few days ago, I was under tight deadline so I simply finished the IDs in Photoshop. I usually polypaint ID in Zbrush as it's quicker. Try this: instead of using edit poly, convert it to edit mesh. See if this takes care of the bug. As a second option try to separate each element (corresponding to each…
https://gist.github.com/monsterblues/5cc668001a7cf16ec500 I've got this function laying around. It's part of a much larger tool set. Let me know if it doesn't work for you. It's complex because you have to detach by Material ID, and then hunt through multi sub object materials. To use the objects should be edit polys or…