tdf#129908 Crash at Data > Group and outlone > AutoOutline

regression from
	commit 7282014e362a1529a36c88eb308df8ed359c2cfa
	tdf#50916 Makes numbers of columns dynamic.

Change-Id: Ie0eff58c7db5a3c85cfea480ca1fea5767fd8cfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86683
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 0df049a..f24a345 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3723,6 +3723,8 @@
    bool bFound;
    ScRange aRef;

    nEndCol = ClampToAllocatedColumns(nEndCol);

    StartOutlineTable();

                            // Rows