* Fixes #6017 * a bit of cleanup work * remove unused variable * change in response to review switch to using std::max(maxMatches,maxRecursiveMatches) * test the case where maxSubstructMatches<maxMatches