fdo#80201: msfilter: fix infinite loop during export

(regression from 6c5557c60f97778fd732c01f054553356ce7f258)

(cherry picked from commit 86b9f03c3f754f7b753893ff2772f6b17bf3de3c)
Signed-off-by: Michael Stahl <mstahl@redhat.com>

Change-Id: I75bfafbc7343aaddbbc5c7433e28b5d4154177dc
(cherry picked from commit 11d6ae6df8dfff1db182ac455d4abcaf7c18ded1)
Reviewed-on: https://gerrit.libreoffice.org/10209
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>