Fix a bug when scanning single file

We should load built-in templates in this case.