Tests - improve treehash test, ensure source data is not modified.