How about something like…
def forward(input, hidden):
    if not corrupted(input):
        output_and_hidden = self.lstm(input)
    else:
        output_and_hidden = hidden # passthrough previous output