In epidemiological modelling, dynamics on networks, and in particular adaptive and heterogeneous networks have recently received much interest. Here we present a detailed analysis of a previously proposed model that combines heterogeneity in the individuals with adaptive rewiring of the network structure in response to a disease. We show that in this model qualitative changes in the dynamics occur in two phase transitions. In a macroscopic description one of these corresponds to a local bifurcation whereas the other one corresponds to a non-local heteroclinic bifurcation. This model thus provides a rare example of a system where a phase transition is caused by a non-local bifurcation, while both micro- and macro-level dynamics are accessible to mathematical analysis. The bifurcation points mark the onset of a behaviour that we call network inoculation. In the respective parameter region exposure of the system to a pathogen will lead to an outbreak that collapses, but leaves the network in a configuration where the disease cannot reinvade, despite every agent returning to the susceptible class. We argue that this behaviour and the associated phase transitions can be expected to occur in a wide class of models of sufficient complexity.