fix stackshift theorems for nested-ifs definition