else if (!CHAR_ID_TABLE_P (str->combining_table))
     {
       Lisp_Object ret
-       = get_char_id_table (character, Vcharacter_composition_table);
+       = get_char_id_table (XCHAR_ID_TABLE(Vcharacter_composition_table),
+                            character);
 
       if (NILP (ret))
        DECODE_ADD_UCS_CHAR (character, dst);
   else
     {
       Lisp_Object ret
-       = get_char_id_table (character, str->combining_table);
+       = get_char_id_table (XCHAR_ID_TABLE(str->combining_table),
+                            character);
 
       if (CHARP (ret))
        {
          Emchar char2 = XCHARVAL (ret);
-         ret = get_char_id_table (char2, Vcharacter_composition_table);
+         ret =
+           get_char_id_table (XCHAR_ID_TABLE(Vcharacter_composition_table),
+                              char2);
          if (NILP (ret))
            {
              DECODE_ADD_UCS_CHAR (char2, dst);