Moved document existence guard out of individual tests for ContextPool.