Autocomplete starts at first typed char (for tickets).

Fixed a bug when we entered a situation with two unhandled references.