I found the problem, though I do not understand it. Somehow, the code that was replacing links to local topics was calling a function that never returned, causing any topic or post that contained
FORUM_URL/showthread\.php\?(\d+)-([^\"\[\]]+?)[#post(\d+)]*
not to be imported. And if a topic doesn’t get imported, its posts can’t get imported.
I think that’s 15,295 topics, which is 3.6%. Making matters worse, we know that some of those topics are among the most important.
I’ll work with @bartv over email to figure out how to move forward.