Variation on death and then loan of funds from family

Would appreciate anyone with any expert knowledge to assist - thanks

Gentleman dies - wife to receive residue in terms of Will.

Variation entered and Discretionary Trust created with nil rate band in 2003

In September 2010 the Trustees settle the Trust to the three sons (being in the class of beneficiaries as was the widow)

At the same time discussions have been undertaken that a loan in a similar amount will be paid to the widow as she was concerned that in terminating the trust she may not have sufficient funds if she needed care in the future. She herself had her own portfolio, house, bank accounts at the time. The family therefore decided that to settle the Trust with the sons released the Trust money to them but to ensure the mother had sufficient funds one son would lend her £270,000.
The funding of this is not the Trust monies or at least the majority of it is not. Two sons settled with £90,000 the other giving the loan used the funds to partly settle the loan - although this is referred to by him as a cash flow exercise only - we believe he had other funds from which he could settle this.
Is this caught under anti avoidance as a non deductible loan for IHT as she has now died.
There are proper loan papers, etc in place.

Ruth Cardwell
PRP Legal Limited