PetScan::resolve_nested: detect and remove duplicate filters