IHT 35 for Free Estate and Trust

We have an Estate with aggregating life interest trust. I’m aware the IHT35 can be used for loss on share in both the estate and the trust. If the QIIP ends in absolute interests (i.e. vesting in remaindermen), can the trustees sell the shares within the trust’s portfolio that are at a loss (as bare trustees) then transfer the shares at a gain, for the remaindermen to sell. Or is this anti avoidance?