Local orbitals for quasi-degenerate systems