Use proper return type for attribute index.