1. Pick every unit that will become invulnerable and add them to a Unit Group variable
2. Add invulnerable ability to the picked unit
3. Make a check, if a unit acquires that item-type, pick every unit in the UnitGroup variable and remove the invulnerable
Since you don't give us the domain of your map (how the event start, how many units are there initially, etc), I just give you the solution to the problem.