Fixed logic bug in toggled multiselect directive #8744.