Remove duplicates when there are multiple heads
What I'm asking you to do is to modify line 287 so that you copy 'heads' to a new array with duplicates removed before concatenating. This is easy to do. I would do this myself if I had permission to modify this file. Take a look at أنتليجنسيا and you'll see what I'm talking about.
You have to consider the implications of such a change though. Let's say that you have these parameters: head=A|head2=A|head3=B|tr=X|tr2=Y|tr3=Z. If your change is implemented, that ends up looking like this:
A or B (X or Y or Z)
It's now no longer obvious which transliteration belongs to which headword.
Concerning this specific case, though, what you're doing seems to be something other than transliteration. You're really adding additional pronunciation details into the transliteration field. Those should really go in the pronunciation section. Transliteration should not be used as a substitute for such distinctions.