Notwithstanding any other provision of this code, the court shall not award attorney’s fees against any governmental agency involved in a family law matter or child support proceeding except when sanctions are appropriate pursuant to Section 128.5 of the Code of Civil Procedure or Section 271 of this code.