Test for lexical lookup by name fallback.
Implement various cases of lexical lookup by name.