When a template name comes from a template expansion, the data-mw.parts.template.target.href isn't set:
$ echo "{{{{echo|echo}}|foo}}" | node parse […] <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='…' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
Compare to
$ echo "{{echo|foo}}" | node parse […] <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='…' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>