I sometimes go through all of my brother's names before I get to my husbands.... I often realise as I'm saying it, so it comes out sort of "Mik-Sa-And-Mathew" (assuming my brothers are Mike, Sam and Andy and my husband is Mathew).
Obviously that is less hurtful than a former S/Os name though, because with a former S/O there's always that worry that perhaps it means something, that it indicates they've been thinking about that person, or harbour some secret desire for you to be that person. But in reality, 99% of the time, it's a simple brain flop that could happen to anybody. If it's a one-off occurrence then the nice thing to do is be understanding and don't read anything into it. I think all parties here handled the situation appropriately.