Fixed poor performance of Prune/Isolate in presence of SetFilter

Due to an inaccurate hash, we were repeatedly computing the globals every time the SetFilter requested them. Not doing that is quicker.