The check for excluding duplicate ACKs needs to consider only TH_SYN and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be ignored for the check.
This fixes the ACK war reported in PR 292293.