Hyborem's second death costs his traits, but the loss of one time immortality does not.
I agree that Resurrection should restore the leader traits. I could have sworn that I made it so in my modmod, but that does not seem to be the case there either.
I haven't really been in the mood for modding much lately but if I do release something else this summer this should be corrected.
(Actually, I'm thinking the restoration of traits will be handled not by the spell but by the initialization of the unit. That way you could get your traits back if you give yourself the proper hero using worldbuilder.)
I may go ahead and try to improve Resurrection further. I was thinking that I'd want to make the spell trigger an event that lets you select what hero to bring back (including civ heroes, religious heroes, unaffiliated heroes like Duin and Mary, and Adventurers which have already died), preferably with xp, levels, and promotions intact. I'd also want to make it so that units killed by The Netherblade cannot be brought back until the equipment is destroyed. I suspect the code for that would be too complex though.
I might end up just splitting the spell into one version per hero, or maybe just adding extra resurrection spells for the units the spell does not currently bring back.. The War Machine and Mithril Golem would probably leave pieces behind like Barnaxus and not use Life III. Black Wind would probably be rebuilt from an improvement representing its wreckage, as the graphics of a shipwreck improvement are already in the game. I was thinking I'd need a complex system of trophies to prevent resurrection after death by Netherblade, but it might be easier to instead create an invisible dummy unit of the same unitclass as each hero and place on on the map under barbarian control whenever a hero is killed by this equipment.
Edit: Now that I think of it, I did create an alternate means of bringing Basium back and regaining his traits. I'm thinking I may allow Resurrection only for heroes that would be alive.