Transform DOM tree patches against each other