Domain deactivation speedup
Fixes several mistakes in domain deactivation appearing for large data sets.
Review commit-wise.
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behavior change was documented? no change