Resolves: fdo#79021 cannot delete ListBox from inside its own Select handler

Change-Id: I884e617b112397697a702216b62d0c1e17aae536
(cherry picked from commit b0a9f33a9b3018dcfb471641bde7c29a6e62f394)
(cherry picked from commit 268c4907a04959ca546c5e2ecf469d4d297293b9)
Reviewed-on: https://gerrit.libreoffice.org/9656
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>