Big part of my problem was leaving some labels that interfered with labels created for export. Then, after importing, things did not fall correctly in place.
I corrected this, but I think still there are cases of broken threads, but so few I am not going to investigate it further. Maybe message ids are not correct after all.