errai-ui: optimization when scanning for template roots

- avoid rescanning for the template root element if the
template was already processed