A wash sale occurs if the security is sold at a loss and the purchase of substantially identical security occurs within 30 days of the sale, either BEFORE OR AFTER the sale.
This is why we see wash sales that occur with any mutual funds or drip plans that are sold at a loss during that 30 day period after dividends are reinvested.
People should always die owing money. So much easier.
If someone calls for a single decedent or close to death client who was making estimated payments, I always advise them to not pay any more estimated, in the hopes the decedent will owe and we can efile.