Everytime our nation discover first the era winning tech, the era goes to another civs constitued of two players. The technology is also automatically discovered by one or two other civs. The guy in our civs who discovered the tech gets the science minister, but that's it.
We should be far ahead in front of the other civs, but now we just give them points for winning the game.
The era win going to a different civ is due to the King bug in which your civ and theirs are cross linked.
As for all the other civs gaining the tech right after you do, it's because by completing that tech you reduced their cost to complete it. I'm not sure how much the cost is reduced for each civ that knows the tech. Also, if their science minister was researching that tech, they got a additional 25% discount since that tech is no longer the era winning tech. This is why, when several civs are racing for a science victory, you'll see a slew of civs completing that tech as soon as the first civ does. This is normal.
Therefore the only bug here is the win going to the wrong civ.
Okay thanks. Good to know what is happening, still frustrating!