During the execution of the vcpu handler of transaction A another transaction B could change the merkle tree state and thus lead to an invalid tree state (after transaction A updates the merkle tree with its changes). In order to be able to detect this, the current merkle root is passed to the vcpu handler and then passed back to the contract together with the merkle tree changes to be applied. The contract can then check if the merkle root that comes back from the vcpu handler is still the same (as before the handler execution). If it has changed in the meantime the transaction must fail.
During the execution of the vcpu handler of transaction A another transaction B could change the merkle tree state and thus lead to an invalid tree state (after transaction A updates the merkle tree with its changes). In order to be able to detect this, the current merkle root is passed to the vcpu handler and then passed back to the contract together with the merkle tree changes to be applied. The contract can then check if the merkle root that comes back from the vcpu handler is still the same (as before the handler execution). If it has changed in the meantime the transaction must fail.