Sections 337.01 to 337.05 do not apply to an agreement by which a promisor that is a party to a building and construction contract indemnifies a person, firm, corporation, or public agency for whose account the construction is not being performed, but who, as an accommodation, permits the promisor or the promisor's independent contractors, agents, employees, or delegatees to enter upon or adjacent to its property for the purpose of performing the building and construction contract. Sections 337.01 to 337.05 do not apply to an indemnification agreement that is an integral part of an offer to compromise or settlement of a disputed claim, if:
(a) the settlement is based on consideration;
(b) the dispute relates to an alleged event that is related to a construction contract and that occurred before the settlement is made; and
(c) the indemnification relates only to claims that have arisen or may arise from the past event.