Deal with None rule_ids in batch-end-session