I have come across this with my BIL and his new DW and her family.
There is a lot of bitterness between BIL and his exW and both have behaved quite badly.
However, i think they should all keep this to themselves in front of their DCs (age 8 and 11)
recently, new DWs mum called BILs ex a bitch in front of the eldest DC, who got really upset and called her several bad names in retaliation. I had my MIL (Bils mum) going on about how disgraceful DCs behaviour was and how it showed his ex was doing a dreadful job of bringing up DCs, etc etc. DC was forced to apologise and punished.
I said, well how would YOU feel if someone called your mum a bitch in front of you, wouldn't you get angry and tell them off? I think the new DWs mum should apologise herself!
MIL can't see this (as she hates BILs ex) and neither can BIL or his DW.
Probably part of the reason he has such a rotten relationship with his ex.
Anyway, I think you are right to be really angry about this, your ex and his GF are completely in the wrong and should apologise to both of you.
I think it is important that you insist that you will limit visits if this happens again, as this is horrible for little DCs.