[PATCH] server: Fix setting context flags in get_thread_context.