Fixing bug in filtering/pruning based on shouldDisplay() and pruning
more from tree