typesafe_cb: fix promotable types being incorrectly accepted by cast_if_type.