As explained on https://github.com/zcash/zcash/issues/967, using const member fields in CTransaction (or any deserializable class) is not well defined in C++, as such fields should only ever be assigned at construction time.
I believe we can get rid of them. Their purpose was making sure that CTransaction was not used in places where mutable fields were required, but now that CMutableTransaction is well-established that requirement is not so strong anymore.
Longer term, I’d prefer to see better encapsulation of CTransaction (which could also introduce better internal representation of the data, without a gazillion allocations) and improvements to the serialization framework so that we can construct objects by deserializing… but I think that’s further out than a fix for this.
So at a higher level, this changes CTransaction from “immutable transaction data” to “transaction data with cached hashes”. I’ve added a small comment about this as well.