Except as provided in Section 25364.1, no indemnification, hold harmless, conveyance, or similar agreement shall be effective to transfer any liability for cost or expenditures recoverable under this chapter. This section shall not bar any agreement to insure, hold harmless, or indemnify a party to the agreement for any costs or expenditures under this chapter.