fix race condition in ktest

This fixes a bug I introduced in #356 where a race condition caused the error messages of failed tests to be incorrect in some cases. I'm not super happy with this fix, but I don't know what else to do. It seems to require a much more deep structural refactoring to get around, namely, some kind of provider class for StringMatchers. Probably Guice is the fix for this?

If someone has a better suggestion in the meantime I'm open to it.