Fixed a segfault for exact match with coding cost