Correction to dependency resolution.

Templates must be available before the application starts.