I think it's more than a coincidence that out of the thousands and thousands of lines of code in my script files that could have been corrupted, the only lines corrupted had a tab and the word "End" in them.
Original line
{tab}{space}{space}EndIF
had become
