Yes, say we have just one option and it has no match with el_value. 
In this case, the matched_len will be 0 and hence, the first(and only) option will get selected.

This is why I have initialised the max_len as -1