Damage and payments

Hi

If a sub-contractor accidentally causes damage to the client’s property whilst carrying out their works (under an unamended JCT D&B sub-contract), can the main contractor set off the costs arising from the client from interim payments to the sub-contractor and if so on what legal basis?

What if the costs haven’t actually been incurred yet (i.e. future expected costs) or if the matter is being dealt with by insurers in the meantime?

Thanks