Consider:
struct MyClass { void f() {} } MyClass::f(){} // expected error redefinition of f.
The routine fails to remove the lookup entry is registered in the semantic decl context and not in the primary decl context of the lexical decl context where we currently are trying to remove it from.