Update the "to be restored" state only once.

Don't update the state again and again, because the tab is unexpectedly "restored" twice after I do "undo close tab"...