correction in cool instruction duplication to detect and replace control instances