No luck with the search for WT_USER_ID in the database – zero matches.
I did try one other trick – for the 3.3.4 version which I installed from scratch, I modified the configuration file to point to my old kiwitrees database instead of the new one, created from scratch. As one might expect, the result was that I got the error messages again. At least this does seem to indicate that the problem is with the database somewhere, and not related to cookies.
Maybe I could try importing tables one by one from the old database into the new one, until something breaks. A bit tedious, but it should reveal which table is causing the problem.