`BacktrackRestore` is a very odd name.  I have no idea what the name has to do with what the code below does...

I don't have a better name idea yet, though :(.