CAPEDWARF-154 Fix bugs in NamespaceService