Making an entity invulnerable with setInvulnerable doesn't work if you do it when you create the entity or afterwards via a BukkitRunnable. The entity is vulnerable to being punched, killed with a bow, etc. (although lava does not seem to hurt it?).
Tested with Vexes and Bats.