Fix for #5579

If the view is named by a string try to look that up first.
Can this `if` just live inside the next `!viewClass` block?