Trust waiving loan to satisfy beneficiary's rent

Could people please share their views on the following:

Settlor is a creditor of an offshore company, which owns an offshore property. Settlor settles the loan repayable to him by the offshore company into an Immediate Post Death Interest (IPDI) trust for his spouse. The spouse lived in the offshore property and has personal rental agreement in place with the offshore company. However, instead of the offshore company repaying the loan to the trust and the trust making a distribution to the spouse to pay market value rent to the offshore company; annually trustees reduced the loan repayable by the offshore company by the market value rent due by the spouse to the offshore company.
(1) Does this present issues from a legal or tax perspective (e.g. because trustees are waiving the loan to satisfy rental obligation by the spouse) and could the trustees waiving the loan be treated as a gift to the offshore company?
(2) Is there a way around this (e.g the trustees having a rental agreement in place with the offshore company, instead of the spouse/company having the agreement) and what are the implications?
(3) Are there useful legislative references or HMRC’s Manual that could provide further guidance to the above?

Thank you