I was checking OP_CHECKSIG today and see that the signature of a transaction will be computed from the transaction but copying the ScriptPubKey from the transaction referenced as input into the SigKey of the new transaction.
I guess this has something to do with tx malleability, but I cannot see in what case this would really help? The tx-inputs already reference IDs that can be changed implying malleability.
It would only make sense to include the inputs ScriptPubKeys if it would be possible to keep an ID while changing its ScriptPubKey (which is not possible), or am I missing something?
I am refering to this graphic Step 7 + 8: https://en.bitcoin.it/w/images/en/7/70/Bitcoin_OpCheckSig_InDetail.png