Avoid a obvious-in-retrospect race condition