[0.7.38.278] Fix and rewrite logic in ObjectSearcher for searching units with the 'visibility' and 'deathState' options.