fix some broken things in replCorrectScript.sml

due to change in invariant_def