If a user filters the picklist the arrow keys will navigate through the entire list instead of only the filtered list. This cause the picklist to focus/select things that are currently hidden instead of only the visible elements.
Fix : Update getChildOptions to only push the child to the options array only if the child is currently visible. Update doSearch to reset the index to null everytime its does a search and also do not search if arrow keys were hit.