More name resolving and corresponding test cases