This is more of an issue (in my opinion) with the assumptions made when designing the autocomplete.
There's a much higher chance that I want to do something with the variable directly above the current line, than define a method inside a method. I get that the autocomplete will look for words in the same document, snippets, and probably a few other items that are language-specific but it's very intrusive when it chooses the wrong thing
(which is almost all the time).
Please take inspiration from Intellisense. Even when Intellisense is wrong, it doesn't get in the way.
In order for an autocomplete to be useful it needs to be right most of the time and for when it's wrong it needs to be unintrusive.