Fix issue with relativization of templates.