Checkpoint before I rip out the output-namespace mechanisms

Which is what I think is causing the element mismatches now that
namespace mapping is in place.
Working through bugs after ripping out output namespace stuff
More namespace bug fixes