Not all 4 legged animals are dogs and I don't think that your reversal of the scenario proves the point.
Can a court really throw out a document, signed by a genuine cop authorizing the person to commit a crime? The cop knowingly signed the document. Isn't this more important than the beliefs of the thief? The thief could explain his belief as "I thought that I was authorized if any one of us was a cop". So, his belief is premised on a factual basis that happened to be unlikely, but true.
Niether your opinion, nor mine matters -- all that matters is what a competant court decides. I wonder if there are any cases where this has actually happened?