Fix for race condition when returning a node from the pool.