Nonconservation of the quantum number K and phase transitions in rapidly rotating nuclei