clang searches scopes in the wrong order, causing strange failures when an inner template has a parameter with the same name as a type in an outer scope. clang bug report: <https://llvm.org/bugs/show_bug.cgi?id=13983>