Fix omitfilesbymatching, tried to be too fast