Added a couple new tests that weren't added in recent patches

Change-Id: I335f58dddee279fcf0c5950296a70ba7a74700cb
Fixed subtle (DSR update) bug in the last step of tpl-encap code

* echo "{{echo|<table><tr>}}foo<td>bar</td></tr></table>"
  wasn't getting encapsulated because of incorrect null DSR checks
  that erased existing valid DSR information.

Change-Id: I48de416052b21c2690106f8ed3181186b4c4d58c