Application of patch from Bugzilla: #33574, by Travis Stevens. Balances a call to appendFieldStart with an appendFieldEnd after appending the field. Test also included.