A merkle root in a block header is a way to commit all transactions in that block. However, since it does not cover transaction witness data, another commitment needs to be made in a coinbase transaction. The only difference is now instead of a TXID we create a WTXID that additionaly includes the marker, tag and witness data. For non-SegWit transactions, it is necessary to use the old serialization format so their TXID is equal to WTXID. My question is, are these legacy (non-SegWit) transactions, i.e. their TXID (which is equal to WTXID) also part of creating a merkle tree for committing in a coinbase transaction or we just take into account SegWit transactions?