Again, the moral and logical solution is to abolish life imprisonment. If someone is sentenced to 20 years and kills a prison guard, they get 10 more years.
I'm not a big fan of life imprisonment either. I like the Norwegian system, where maximum prison term is 21 years,
but if one's deemed to be a danger to society if released, it can me extended (that's why, despite right-wing talking points, Breivik is never getting out).
Many see it as "soft", but for me it's more reasonable than the absolutist approach with long, even mandatory sentences (not just for violent crimes, as we can see in America), that results in nothing but badly overcrowded prisons, that are both costly and utterly unproductive. Naturally, there are individuals beyond rehabilitation who ought to stay isolated, but every rehabilitated offender is a victory for society.