As a borrower, you will have to protect the lender from any loss of corporate action entitlements at all times. Therefore, when securities are bought back after the ex-date, you will have to reimburse the lender the same amount of corporate action entitlement as if the lender is still holding onto the securities.