handling loader stacks when loading template types