View name resolution regression tests

Issue #5579
Merge pull request #5582 from briandunn/fix-view-lookup

Fix for #5579