fix superheating and supercooling for java backend

@traiansf @yilongli please review
without this, stuck-letrec does not get stuck, but instead can evaluate to 2. This seemed incorrect to me, so I changed it.