fix a bug caused by "extends <asset_spec>"

The relative template extensions were breaking templates inheriting from an asset spec. This is a regression that didn't have a test.