Fixed #18829 -- Fixed ModelChoiceIterator length

Thanks facundo.olano at gmail.com for the report and thikonom for
the initial patch.