Phase transitions versus shape coexistence