The Barry that was in the closet, that got erased was the Barry from S1. The Barry that saves his mom is season 2 Barry. So that means that the events of season 1 are now part of an alternate timeline. Season 2 Barry lives through the events of saving his mom, and at some point travels back and now has to prevent his past Season 2 self from stopping the Reverse Flash.
So when we see that scene again there will be 4 Flashes; the one that runs young Barry out the house and then disappears as seen in season 1, the one in the closet who will not get erased this time, then the one who has lived through Flashpoint, who not only now tells the one in the closet not to intervene but who now also has to stop his Season 2 Pre-Flashpoint self that came back to stop the Reverse Flash.