I really think there should be some invisible wall (or really good pathing AI) that prevents all non-player characters from entering lava. It is silly watching an entire NPC purge tribe kill themselves as they try to cross the lava to reach your base.
How can it be that there are fully grown scorps, snakes and rocknose in the volcano that suddenly decide walking on lava is a good idea? Someone needs to figure this out. It seems so counter intuitive to build a highly defensible base and then have to go pave over all the surrounding areas of lava, just so NPCs have a chance to survive long enough to reach your base.