Strange column widths in report with repeated columns

Let’s take a simple ods report template with repeated columns:
Result of generating this report:

Why is the width of columns A, B, C, D in the result equal to the width of column B in the template?
Why is the width of column E in the result equal to the width of column D in the template?
We believe that the width of column A should not have changed, and the width of columns B, C, D, E in the result should be equal to the width of column C in the template.

I guess it is because there are two cell loops on two different rows.
I guess the _handle_column_loops is generating too much directives on the table-column tag.
I think you should report a bug with a simple example that allows to reproduce easily the problem.

We have removed the first loop and got the same result.



We have prepared a patch that fixes this bug:

Here is a document generated from the first template after fixing:

This patch also fixes the following bug:
Report with repeated columns and spanned cells in heading

Request for developers: please check the patch and update relatorio if everything is OK.

Merry Christmas and Happy New Year!