After adding the ability to sort each column and after sorting one of the columns once the header jumped into the correct position.
But that is just a temporary fix and no final solution so my question is still open.
It is really hard to help without the testcase.
In general, I have not seen anything like this ever.