handle shadowed namespaces (#2753)