Fixed autocompletion of variables declared in functions (fixes #19)