Fix indexing of sub-objects.