Data structures now per-doc

Reconsidering use of xquery to populate matrix table links (merely
because it seems false negatives are so sparse -- every error is an
error that is present in only the engine).