fix UnboundLocalError when trying to remove rule from empty security group