md: when a level change reduces the number of devices, remove the excess.