Make disabling last cipher work. (Imported from upstream's 8f243ab6c173096943ca079648d240eba1e46dd3) Change-Id: I929e481842c489aa28f28cf066b4556160a23efe