server: Don't change cached thread context in set_thread_context.