When the columns are changed at runtime, the views are badly confused. Also, not using the parent index in some methods break trees, but I don't care much about that. Here is a patch to fix the worst issue. I can push it.
Created attachment 102549 [details] patch
Please create a review request for your patch, either on https://phabricator.kde.org/differential/ or https://git.reviewboard.kde.org/ The patch has multiple coding style issues, and these are best discussed with our code reviewing tools.
Done https://phabricator.kde.org/D3548
https://phabricator.kde.org/D27876 landed meanwhile.
Closing per comment#4.