MODE-2141 Added validation for removing used namespaces.