#850950 by jhodgdon, gpk: Fix problems in excerpt matching function.