Altered so, that if output is enabled even though the latch enabling is no longer valid, the last state is still being outputted.