fix circular reference in templatemapper definition