use generic base classes when resolving @:access checks (closes #3005)