Gaddafi is probably no going to be affected by this in either way.
He had rather little to do with it, from what I have (so far) seen. Rather, he allowed public pressure to move this through the courts as his government medical adminstration simply ducked their responsibility. Once push came to shove, he then probably “encouraged” the Libyan courts to make some better choices.
There is a huge popular sentiment in Libya that this had to have been a deliberate act by outsiders. For him to have simply shuffled them out of the country might have led to rioting (or, more importantly to him, probably, challenges to his rule).
This way, the medical team gets to go home (years late) instead of being executed. The mob gets the satisfaction of knowing that their legal system prosecuted the nasty foreigners. Gaddafi gets to stay in power. And some money gets set aside to help the kids who were harmed by the idiotic and unhygenic medical practices of the Libyan hospital (which has, reportedly, cleaned up its act).