LT-14656, fix various problems with XHTML export

A particular project originally complained of a duplicate css style.
I fixed that, which revealed another, and when that was fixed I got
a null reference exception. Don't fully know why this doesn't bite us
on more exports, but the fix was obvious.

Change-Id: I8100f579e4fd9b7d972230b8c226681bea4837ad