Saddam of Iraq had many doubles who after plastic surgery looked exactly like him. The Libyan NTC better check the DNA and forensic tests to confirm this really is Gaddafi. If they had the wrong man and never check, then this is the smartest thing that Gaddafi can do at this time.
He could have been subject to worse, far worse treatment than this, considering what he did to his enemies, the imprisonment, torture etc.... Not only by him but his sons too. Who's going to shed crocodile tears here but those beholden to him, who derived benefits from his legacy. Notice all those dictators of this world meet such same end, he who lives by the gun dies by the gun.