fixing race condition on destruction of namespace_repo_t