I have a question, do you really mean to mark all temp slots, including
those that had been allocated and freed already as used and kept?
I believe that was indeed the intended effect, but I don't think I could
construct the case that motivated it.
However, this code is rarely used, so it isn't as bad as it might seem.