Merge branch 'fix-endless-loop' into 'master'

FileManager: Avoid endless loop on invalid files

See merge request !41
9 jobs for master in 4 minutes and 9 seconds (queued for 1 second)