Fix importing of templates served by plugins

Fixes the `<!-- IMPORT -->`'ing of templates served by plugins.