Fixed bug in _subdev_remove when subdev list is empty