Implement State.merge_children.
Test state.transaction, now that merging works.