ref_transaction_create(): check that new_sha1 is valid