Add old reference finding code back

This can be used instead of using FindDeclarationLocation when renaming
a local identifier.
Remove unused value
Code to determine whether an identifier is accessible

Outside the file it is declared in