Consider the circuit shown above ... that switch should have no bearing on the output. I used T flip flops here, but really they could represent any kind of logic no matter how complex.