Replace defunct `z.flags` references