Returning only top level namespaces in getNamespaces()