this is not wash sale.
Wash sale: buy at X, sell at X1, buy at X2 within 30 days, the loss at X-X1 is not recognized, if sell and buy occurs within 30 days.
You only have buy at X, buy at X1, buy at X2, sell at X3. The loss at X-X3, X1-X3, X2-X3 are recognized.