This code was broken with respect to LLAPRPool. Fix that, and also fixed it for the new AIThreadID API.