Fixing related files on editfile pages

Hopefully fixes #1377 properly