Fixes #104573
Before this change we tried to cleanup a list consisting of a single
file only. Then, since that single file had the same prefix as itself,
we removed it from the list.
With this change in place, we skip cleanup if there's only one single
file.