Fixed an error message on the terms filter
Call DISI#cost() ahead of time to prevent NPE

NotDocIdSet resets the internal DocIdSetIterator to null causing NPE
if cost is called.

Closes #3177