Run tests on the compiler thread to make them more stable.

This should fix the recent spurious failures we experienced.