Add function Clause.rewrite_ground_terms