I don't know if you played DOS2 or not, but your character was not permanently dead if teleported into lava.

Anyway, the overriding point is that anything players can do, npcs should be able to do as well (from an AI stand point).