Fix constructor for transactions with a fixed hash. The hash was changed unexpectedly. Adds a test for this special case.