Confusing error message: "'subscript(_:)' requires the types 'String.Index' and 'Int' be equivalent"