Address a large chunk of this FIXME by accumulating the cost for
unfolded constant expressions rather than checking each one
independently.