Change how double-flush protections is handled to be slightly saner