fix stack counting bug in catch compiler