Fix side effect on `expected` in `convert_to_sql` matcher