Fix check_cheating bug involving scope.