Fixing the bookmarks was slightly more complicated than I expected.
I had been using the generated ID, eg. FAM-43 as the bookmark. But I saw that was wrong, since those IDs are specific to the run, and reorganizing may lose them or they might point to incorrect places. So I changed this to use the ID from the GEDCOM instead. This way, the bookmarks can be remembered between runs, as long as the GEDCOMs don’t change.
But I had to work through each type of bookmark (individual, family, source, place, etc.) one by one to get them working, so its taking time. I’m almost done though, and should be able to wrap this up and move on in a day or two.