Namespace Scope URI fix

namespaceUri would report null if the namespace was declared further up
in the hierarchy. Fixed that bug.