Fix a bug where the same file would be included multiple times