Fix an invalid array access.