Fix for bug 923176

- Handling missing or empty component_instances
- Handling false positives for UID checks for districts