Fixed memory leak where detected redundant SQL clauses are removed,
but not freed.