Handle query-replace table as a special case.