effects in optics are spontaneously established asymmetric regimes of operation of coupled lasers [@lasers; @NatPhot; @NaturePhot2; @Chili], and breaking of chiral symmetry in metamaterials [@Kivshar].

In addition to usual bound states, one may work with quasi-localized modes in potentials which do not admit complete trapping in linear quantum mechanics, but give rise to leaky bound states, alias quasi-bound ones. The combination of such a potential and self-attractive nonlinearity makes it possible to transform the leaky states into truly bound ones [Carr1,Carr2]{}. This possibility, in turn, suggests another setting, which is the subject of the present work: DWP structures embedded into a potential barrier. In the linear limit, this structure support solely symmetric leaky modes, that may be transformed into self-trapped ones with the help of the cubic self-attraction. The main feature of the system which, to the best of our knowledge, was not explored before, is competition between two different mean-field phase transitions of the second kind, driven by the nonlinearity: the SSB and transition to the self-trapping. Realization of the competition in stationary states of the DWP system is the main subject of the present work. We demonstrate that, depending on parameters of the DWP structure and nonlinearity strength, 