Make sure we aren't storing compilation state in a way that will cause problems when a different thread can have a different catalog compiling.
For context on the above, these two spots specifically were erroring in this way repeatedly. Hard to say if they errored every time, but certainly many times, always on these lines.
The work from this ticket did not solve the above failures. We'll have to dig in separately.