Can’t scrape new tv shows after Krypton update

I just upgraded to Krypton (v17.1). The new databases were created, and seem to work with the current data. But when I try to scan a new tv series, the scraper finds and downloads the information, but instead of creating a new series, it seems to replace an existing series with the new information.

Looking deeper into the database tables, values for new additions (since migration) are all convoluted. All of the files in the TV scan path are entered correctly into the files table. But, the idFile’s used in the episode table are wrong. And somehow the last row in tvshow gets deleted, a new row is created (for the new series), but somehow gets linked to information about the old show.

Really confusing, I know. But looking at the db tables, and then looking at what the log file says it did (ie, the sql statements), it looks like a rat’s nest: I can’t find any logic in how various ids get chosen and where they get inserted.

I can provide the log file, but it may be difficult to follow without the actual db.

FWIW:
I’m using mysql (actually mariadb on fedora linux), and running Kodi via OSMC on a RPi3.

Any help greatly appreciated.

TIA

ken