Don't treat import paths as template locations.

Closes #1737.