Allow  ̀expand` and `noexpand` to be used as a flag in index task.