Remove unused extra $to_check variable.