compiler: better checkRef code generation