(1)No account is to be taken of the cancellation or modification of an undertaking contained in a contract where and in so far as the undertaking is being enforced or otherwise invoked—
(a)by virtue of a person’s third-party right to do so, and
(b)in consequence of something happening or not happening prior to the undertaking being cancelled or (as the case may be) the modification being made.
(2)Subsection (1) does not apply in relation to a cancellation or modification if the contract provided that it may be made with retroactive effect.