Legacy files settings ... two places ... site and in each course?
At what point during the 'moodle march' did the behavior first appear?
The link to these files ... do they produce 404's or what? Can you provide screen shot or two?
Have you queried the mdl_files table for the name of the file to see if there is a reference in the DB? Data returned from that query will show content hash. One could copy that to clip board, click on a terminal window where root user has logged on and changed directories to the moodledata/filedir directory and type: find ./ -name [paste-the-contenthas].
File there?
If so, one could also get a clue if it were a PDF or other type of file:
The output of the command above will show something like:
./f3/6b/f36bthenabunchoflettersnumbers
Use file -b ./f3/6b/f36bthenabunchoflettersnumbers
to see brief info about file.
'spirit of sharing', Ken