A sufficient condition for semistationarity in constrained optimization