Keep current key or group as long as they match
If a key/group has been set either explicitly via the setters or by
the user via auto completion, then use/keep this key/group even if
multiple keys and/or groups match the entered text. Multiple keys/groups
can match if there are multiple groups with the same name (and the same
number of keys) or if the user deleted part of the entered text.