Made r_sanity_check macro have balanced braces.