     selectedOptions[i] = option
     value = @props.annotation.value
 
-    optionsKeys = (o.value for o in selectedOptions.slice(0,i))
+    optionsKeys = {}
+    selectedOptions.slice(0,i).map (option, j) => optionsKeys[@props.task.selects[j].id] = option.value if option?.value
     options = @getOptions(i, optionsKeys)
     newIndex = options?.indexOf(option)
     if newIndex is -1 or newIndex is undefined


  render: ->
    {selects} = @props.task
    optionsKeys = []

    <GenericTask question={@props.task.instruction} help={@props.task.help} required={@props.task.required}>
      <div>

    annotationValues = @props.annotation.value
    unless annotationValues.length
      @props.annotation.value = @props.task.selects.map -> {value: null, option: false}
      @syncAnnotations()

    if @props.autoFocus is true
      @handleFocus()
