Correctly replace instructions with constants.