Fix: bad text extraction bug. Text was exponentially duplicated

Failure to clear the text accumulation result buffer was leading to
duplication of text, which was causing problems in callers.