You are probably right about the racism, but it occurs to me that most people probably view the situation somewhat incorrectly. Most people probably believe that whoever treated Ian unfairly are racists in that the punishers believe the worst about black people, and therefore want to punish him more severely. I would guess that the situation is slightly more nuanced – the people punishing Ian harshly probably don’t think about Ian being black at all, except that they believe that
other people will view Ian (and other black people) with less sympathy, and therefore it is safe to deliver a harsh punishment; they will appear (they believe) as being tough on crime, with no appreciable drawback. Of course, this backfires when more people than they thought
do have sympathy with Ian, but this might not make they themselves racist. They might merely lack a conscience, and also believe that
the public is predominantly somewhat racist. (The action is the same as a racist would have done, but people can do the same thing for different reasons.)
I.e. racism might not be as widespread as commonly believed, and, furthermore, perpetuating this belief will probably only make unscrupulous people behave more in line with what they think racists would want. It is, in theory, a self-perpetuating cycle.