"Undead creatures that hit the wearer" - it does not specify on how wearer should be hit : only melee , ranged or spell damage also counts.
It is working as intended if ALL damage sources. And reaching <1 HP the character should die.