Catch problems when document tree is invalid
Catch problems when document tree is invalid

This can occur when there are two sections sharing a single ID.

brechtm/rinohtype,brechtm/rinohtype,brechtm/rinohtype