Uglify name when retrieving method for annotating

Multipart method names were not uglified before being retrieved when
processing annotations, causing an internal error. Now the correct
method is retrieved. Additionally, the searches through local self and
scope in this and several other cases were redundant, and only the
direct scope is searched instead.