Remove some direct access to fields/indexesByName.