After some more tests, I found that it is indeed GetRect() that messes things up - more specifically, it is the line which generates a new glyph.
My conclusion is that an OpenGL texture cannot be active on two different contexts at the same time, even if it is not used concurrently. I kind of confirmed it by activating another texture after drawing the texts in the main thread: it worked with a little lag (probably due to the locks and sleep calls).
It also explains why the first text is always rendered properly: the texture is not active yet in the main thread.
I couldn't find more information about this, and don't know if it can be solved