Properly update iterator when browsing a list containing invalid files

This ensures that an invalid file is not requested to be displayed, nor
a thumbnail for that file, which could cause invalid memory accesses
fixed in the previous commit.

Fixes: #94, cab91f0a
2 jobs for master in 1 minute and 12 seconds (queued for 3 seconds)