0.8.10, Win 10 - Cannibalistic Tendencies buffing without killing user

In the Loid fight, the cave cockatrice gained Cannibalistic Tendencies as its temporary traits. It then provoked nearly every turn, without dying (due to boss immunity?), continually supplying large stat buffs to the enemy team.

In a situation where the user is immune to the death effect, I’d expect the spell to be invalid, or at least for the stat buffs to be reduced.