Fix gh-2 : input signal for latch that cycles only through the valid cases