Limitations of density functional theory in application to degenerate states