Improve test_id.c for cases of REP prefix.