Yes, here you're right. There is a ref mistake and a "ref mistake".
Ronaldinho's goal against Inter was scored after offside, but Kaka was almost on line with the Inter player. The picture didn't froze, players go from onside to offside in 0.0001 sec., and these errors are normal human errors...