Phase transitions in Heusler alloys with exchange inversion