765 references in distributed ontologies

This should fix #765.

The test would generally also be a candidate for #786.