Safari not restoring last session properly
There is a lot of advice what to do when Safari doesn't restore tabs/windows from the last session. My problem is slightly different and I couldn't find relevant answers, and the existing advice didn't help.
I have some half dozen tabs open. I quit Safari. I reopen it, and tabs that are restored aren't most recent ones; instead, what is restored is a set of tabs from several months ago. I had deleted preferences (.plist), I checked permissions on folders, without much help. History menu keeps record of my browsing and is up-to-date.
What could possibly cause Safari to fail to save the current set of tabs at the time of quitting and keep restoring from a set that is months old? This is an old mid-2011 iMac with High Sierra.
iMac 21.5", macOS 10.13