Spellbook/Lightning orb HP bug

Giving a unit the Lightning Orb or Spellbook abilities causes the unit to be immediately removed if the unit has bonus HP >= 100% of its base max HP. This behavior also happens on unit creation, although in previous tests, if a unit is created with spellbook/lightning orb and THEN receives 100% or more in HP bonuses afterwards, it is not removed.

It would be very beneficial to mapmakers to have this bug fixed. Thanks!