Fixed latex output for multi-indexed dataframes - GH9778
Proposed fix for https://github.com/pydata/pandas/issues/9778

The formatting issue was caused by an incorrect number of elements in the (first) index columns of `strcols`. The length of reinserted columns was based on the number of elements per index level, but should have relied on the number of rows/occurrences of such elements.
