At least in the US is proveably isn't working as intended. Section 1983 of the federal code was illegally modified in 1874 by one person that had no authority to do so. That revision is what "decided" Harlow V Fitzgerald in 1982. That case should have found that the 1871 Congress had outlawed any immunity from prosecution for civil servants of any kind.
This is also similar to how "corporate personhood" became a legal fictive, yet legal precedent.
The system isn't working as intended at all, and the consequences of those two minor "revisions" has allowed the rich to buy the government.