Changed recurse_var_replace to void as its original return value was never used anywhere.