Fixed bug and added missing test for element w/ child + content.

The code path handling a structure like below was not covered by unit tests:

    with xml.div("Content"):
        xml.img(src="http://server/image.jpg")