show correct autocomplete after typos

Uses the correct context for partial matches, such as when correcting a typo in a sample name.