Implemented and tested captbl_decons.

Fixed the cas usage in retype_tbl.