I had a similar experience several years ago.
I flew Brussels Airlines IAD-BRU-LIN.
I got zero credit for the IAD-BRU (longhaul, naturally, the one that matters!) flight. But DID get credit for the BRU-LIN flight.
So I submitted a missing mileage request, and was denied, with United explaining that records indicate that I no-showed for the flight.
I replied via the appropriate channel that I clearly HAD shown up for the flight, since it was the third of four legs, all others of which I had taken AND received mileage credit for.
And that's when I heard that sound.... of silence...
So, between that, Dr Dao, and a few other things, I quit flying UA.
And I came out way ahead.
UA can keep their lousy 4000 miles.