Should be easy enough, UI shows the picture of the guy who scanned the first ticket and system tells operator you go and check his ticket. If you can't find him on the plane he's hiding in the bathroom, call security to get him out.
I've lived in a number of countries in the past 10+ years and encountered more than my fair share of edge cases when flying. On the average, the gate agent has to override something 1-2 times per year when I fly internationally.
Given there are thousands of security cameras in an airport, I don't think anyone would mind if one was used to record who got on the plane.
"He's a witch! Burn him!"
Humans make mistakes. You don’t need to prosecute every single individual that makes a mistake you know