Deliverator
Graphical Hackificator
Automatic weights assigns weight to a mesh based off the proximity of various bones to the mesh. I used it with Zara Yaqob as well and actually got the same issue. Fixed it by altering your script a bit @Deliverator, though I didn't do it particularly elegantly:
Your fix is probably more elegant than the existing solution and more bullet proof so I'll incorporate it into the release version. Thanks!