Fix for #5579

If the view is named by a string try to look that up first.
Hm, if `newView` comes from the factory lookup it misses the `instanceof` assert inside `handlebarsGetView`.

Maybe we should just pass the type to `handlebarsGetView` with the type and clean up the logic in there?