Make namespaceIdentifiers less invasive

The rewriter will only introduce special names for identifiers if
there's shadowing involved. Specifically, if an identifier is never
projected through from one scope to another, it will not be altered.
In addition, trivial projections such as `WITH n AS n` are also
understood not to introduce ambiguity to identifiers.