Sometimes after I get an upgrade I just start taking damage and die almost immediately. As far as I can tell there's nothing actually hurting me. And it's not the same upgrade.
Edit: I've seen a similar bug in another game caused by enemies spawning in undefined coordinates, and being registered as always touching you. Maybe check that.