Append entire DOM fragment at once.

As noted in #3973