To compensate for the AI's shortcomings and people's neverending ability to take advantage of it, I propose that if you die in a guarded town you just get sent to the local hospital and you get to keep your items.
That would just create more problems especially concerning thievery.Player A steals from player B, player B then shoots player A at which point player A awakens in hospital with all his stolen loot ready to get away scott free.