Apparently working version of term constraint reprocessor.