fixed lookup of nonstatics in static methods