Fix a bug that caused pages with custom filenames to resolve incorrectly