Avoid a race condition if another thread happens to remove the error