Fix dead store and simplify. No functionality change (although the code is now
correct if MaxEditDistance were increased to something greater than 1).