fixes #6216 - deleting a subnet that is associated with a host group throws foreign key error