LT-14432 handle empty environment before real one

when clearing out empty environments on leaving
phoneme environments view of allomorph

Change-Id: I4656f45265c9324be3f3d1de31e0024983fd7c50