Protecting a circuit from inverse connections