The attached patches fix the 5 bugs in this bug report, as well as 11307, 24509, 24688, 24743 and 25326. testcover-reinstrument is a code walker which rewrites Edebug's instrumented code replacing Edebug's functions edebug-enter, edebug-before and edebug-after with Testcover's functions (some with different call signatures), and at the same time determining which forms might only return a single value and treating them differently. Since it uses car and cdr to parse and rewrite the code, it is consequently difficult to read and modify. My original goal was to change testcover-reinstrument to use pcase, but along the way I realized that I could simplify it and not only fix all the bugs where one of Edebug's functions gets left in the instrumented code, but remove the possibility of undiscovered or future ones by not doing code rewriting and instead adding a hook mechanism to make Edebug's functions call Testcover's. So in these patches testcover-reinstrument has become testcover-analyze-coverage, which uses pcase to walk Edebug's instrumented code and save the results of its analysis of single-value forms in Edebug's code coverage vector.