After thinking about it a bit, I came to that same conclusion - will post a patch soon
Luckily Francois, who has been working on the DB migration script, had already worked around the problem, so it only slowed things down. But in the debugging session I came across this, and got rather worried.
General developer forum
Very unhappy about insert_record() behaviour
This discussion has been locked so you can no longer reply to it.