CheckClassAccess: preserving case of class name in error messages