It has been well-established, morally, from Church history, that when one sees at least one serious danger to the faith, we must flee that association, regardless of whether the association still has valid Sacraments. The priority is the moral obligation to flee what is a danger to faith. This is what occurred, famously, with St. Athanasius and his few followers. Forget whether the Sacraments of valid, the prime question is, "is there a danger to faith by this association?"
If yes, then simply stay away, sufferings come what may.