This code previously only allocated enough space in m_col_elements_by_index for 1 slot per column, meaning that columns with a span > 1 would write off the end of it.