Way back in the mists of time, my grandmother was having an affair with a married man, and got pregnant with my mother. In an effort to get him to leave his wife and their young children (I think the oldest was 5 and the youngest 2 at the time this was going on), she named my mother "after" the daughter he had with his wife - think Jane and Janet. Needless to say, her ploy didn't work (so she ended up lying to my mother about who her actual father was for years, despite him being "a friend" who would spend time with her as a child, then later on with my brothers and me - we only found out definitively last year, after I took an Ancestry DNA test). My mother - who was interested in who our ancestors were up until this point - was deeply hurt to discover that, essentially, her name was "not really [her] own" and has refused to participate in any contact with the half-siblings whom she's never actually met (I have, though, as I was taken to visit my adoptive grandfather's "friend" once a week, every week, every time I stayed with them until I was 13 or 14... 'Jane's children and I used to play together if she/they were visiting her parents at the same time of our visits, whilst my oldest brother's son is best friends with one of 'Jane's grandsons!).
Names are important, no matter how old we are. Okay, so there are going to be others in the world with the same name as us... but how often do we actually meet them? Never mind share a parent with them. My mother is in her 70s and was really keen on our family tree - until she discovered that she not only had half-siblings... but that her half-sister's name is almost the same as hers! That's a wound she will carry for the remainder of her life, and it's been awful to witness, as her (protective) child. My grandmother is in her 90s and when asked, when told that we knew the two girls had been given what was, essentially, the same name - was that my biological grandfather's doing... she admitted that no, it was all her, that she wanted him to know that he could "replace" those little children he had with his wife, with my mother.
So this sort of thing has been going on for years - and I think it's infinitely weird. I thought it was peculiar when my ex-boyfriend named his oldest child very similarly to my oldest (not his), but it's worse, i think, when a parent essentially discards the older child in favour of the new one, namewise. But, OP, this may not be your ex's doing... it actually might be his current partner who has given their individually precious newborn a name derived from the older half-brother's, through jealousy. Maybe your ex reminicises about your family set-up, or your son has spoken "too" glowingly of you in her presence, and her jealousy's kicked in to a point where she imagines that she can replace Barnaby with Barney. Ideally, she needs to be reminded of the damage that this will do to her step-son, long term (my mother will never get over the hurt and confusion she feels, for example), or your ex needs to expect a hefty therapy bill for both his sons at some point in the future when Barney works out that there was already a Barnaby when he was born!
I'd take him up on his offer to rename the baby (he may already want to, this may not have been his doing) but I'd also explain the damage her choice of name might well be doing to Barnaby - and, in years to come, if she doesnt change her baby's name, to her own child, My mother will never forgive my grandmother, will probably never meet. her half-siblings, will hurt for the rest of her life. And she was the Barney in this situation!