Have SubGraphExporter export uniqueness constraint. Fixes #1758.