WTS: Make LinkHandler more robust in the presence of diff markers.

* No change in parser test results in this patch, but fixes
  test failures in my dom-diff patch, so no need for new tests
  in this patch.

Change-Id: Ibaaec384cf59614c18ff8146bd90e2f6d0477e35