Do you need `state.forinifcheckneeded` here? Maybe you check if your `forinifchecks` stack is non-empty?