Consider the following segment from Atlas Shrugged:
"But I don't know what's wrong with it." The man sighed, bewildered. "I don't know what to do."
"It's the vibrator that's out of order," said a voice behind them; they whirled around; Galt was struggling for breath, but he was speaking in the brusque, competent tone of an engineer. "Take it out and pry off the aluminum cover. You'll find a pair of contacts fused together. Force them apart, take a small file and clean up the pitted surfaces. Then replace the cover, plug it back into the machine—and your generator will work."
In the passage above, Galt explains to his tormentors how to fix the torture device that had broken and they knew not how to fix. Although the irony makes a powerful statement, Galt is in fact violating his sacred creed by giving his enemies the tools of his own destruction.
As proof, Galt earlier says:
I am the first man who would not do penance for my virtues or let them be used as the tools of my destruction. I am the first man who would not suffer martyrdom at the hands of those who wished me to perish for the privilege of keeping them alive.
So it seems like he is violating his principles in fixing the torture machine for them. Why did he do it? Was it merely an irresistible literary device for Rand that "the real John Galt" wouldn't have done?