Fix autocompletion when function name is missing (fixes #530)