Fix removal of expired ScheduledDowntimes.

Fixes #6321