Properly auto-complete variables from local scopes (issue 7016)

https://code.google.com/p/fbug/issues/detail?id=7016