Fix race condition in documentation build