fix crash in js optimizer loop variables pass on empty if blocks