Modified DeadVars algorithm.

Now we can call it more than once, and it won't ruin the states we have
already set.