Fix an error when attempting to auto-complete from a new dir