Most of the security guards stayed with the consulate personnel to the safe house and then exfiltrated after that location was burned down.
There are a number of wounded Libyan security guards that suffered gunshot wounds. I’m guessing that only one was a turncoat.
I have read that the 2 who were killed came in from a different location (perhaps the embassy in Tripoli?).
I'm guessing that the consulate was protected 100% by Libyan forces.
Don't know if that's standard for a consulate; an embassy, I believe, always has Marine guards.