Resolves: fdo#78838 past-the-end iterator

Inserting data in pColumnData invalidated miAutoPosColumn
See https://bugs.freedesktop.org/show_bug.cgi?id=78838#c6

Cherry-picked from 1df54514d7a1ebb1b4fa16cca386a34e7c41c490

Change-Id: Iece423cd8d14f5ae7bf382583c0369895a00f168
Reviewed-on: https://gerrit.libreoffice.org/9409
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>