template: break out of iterator if expand fails
template: break out of iterator if expand fails

If a descendant fails during expansion, short circuit the loop.

GNOME/template-glib,chergert/template-glib