fixing coerce_term_t for val_t -> val_t