Fix dump_topterms.