Image tabstrip: fix thumbnail order changing when invalid images are loaded

If an invalid image is detected partway through loading, the image is
(obviously) unloaded.  Unfortunately, the image tabstrip was being told
to remove the last-loaded thumbnail, even if the failure occurred prior
to the thumbnail generation step.  This means thumbnails of valid,
loaded images were sometimes being erroneously unloaded - oops.