Correctly apply nested templates.

When a templated control's template itself contains templated controls,
make sure all of the templates are applied, as the nested templated
control might contain something the top-most templated control is
looking for.