Any amount deducted by a public entity, pursuant to law or the terms of a contract, from the retained payments otherwise due to the contractor thereunder shall be deducted first from that portion of the retained payments for which no acceptable securities have been substituted and then from the proceeds of any deposited acceptable securities, in which case, the contractor shall be entitled to receive the interest, coupons, or income only from those acceptable securities which remain on deposit after such amount has been deducted.