Use a more precise UUID detection in the `FilesModel` class (see #7054)