Placing this as 'major' as there is no workaround possible here. This is just a straight-up Tuque bug right down at the bottom.
The error is here
After this specific case, there is no break statement. The switch therefore happily moves on to case 'unset' and immediately unsets whatever checksum was set.
- Jam a break in there
- Write tests for this case. Really, NewDatastreamTest.php should contain more tests, as we have weird use cases
- Update the tuque docs to say that checksums are mutable. That one's my bad; I always thought they were immutable because setting them never worked because of this