Remember, there have been hints that Gil isn't in the driver's seat anymore.
At least not all the time. Also, a good while back there was a question of whether a slaver wasp could maintain control of a spark while they were in the "madness place".
My convoluted theory: The Other encouraged Klaus to use a beacon engine to download himself into Gil. Bringing the other's influence over Klaus with him. The four armed advisor (who's name I forget), having already suspected Klaus's infection, countered this move by somehow inducing the madness place in Gil and keeping him there, while surrounding him with trusty guardians who were beyond infection (Dupree, already treated to prevent it, Higgs, because he's fricken Higgs, and the Clank). This allowed Gil to remain free long enough to duplicate and distribute the slaver wasp antidote, and possibly even free the father in his head in the process. Leading to the current state of war between the Wulfenbachs and the Other.
So Gil must be kept crazy for the greater good of the Empire.