correctly index class members from supertype