Bugfix: Removing obsolete items after reloading config is broken.

Fixes #3644