Well, prison is a strange target for a bomb. Of course you get the guards, but also the people who al-Qaeda threw into that prison and being their prisoner is certainly not a strike against you.
You're right, but I'm not under the impression that the russkies give a damn about who they hit - friend or foe - and I don't think al queda bothers with prisons, they just cut off your head.