SERVER-8594 fix clearTmpCollections for collections with indexes