When trying to update the record for a remote site, a "duplicate key" error is triggered, because SiteStore tries to save a new row with the same global id, instead of replacing the renaming one. This is caused by the fact that SiteStore uses the "internal id" to decide whether to update or insert. This behavior is dictated by ORMRow, but inappropriate for sites, or anything else that has a native, non-numeric primary key.
We should stop using ORMRow/ORMTable, and remove the internal ID field from the sites table and Site object.