Allow a `State` to be conditionally locked/unlocked to avoid infinite loops in certain cases when two signals set to each other.