Implement hack to handle case where some filenames start with a string that is
identical to the entirety of some other filename.