Shouldn't isInValidNamespace be used here?