I don’t believe in the doctrine of attachment it was made up on the prequel. It exists literally nowhere in the original trilogy or the expanded universe before episode II. In fact Luke wins because he doesn’t follow what Ben and Yoda told him, his attachment to his father turns the tide of the war bringing Anakin back to the light.
You’re correct that it was made up in 2002 for Attack of the Clones. But nothing about what Obi Wan or Yoda told Luke in the OT applies to it either.
Personally, I like the way the old EU handled it. There was a time when Jedi were totally free to get married and have families. Then, somewhere between Tales of the Jedi and the KOTOR comics, the no-marriage rule was introduced. But later on, Luke got rid of that rule when he started his own Jedi Order. I think this kind of development adds depth to the lore, and makes the Jedi feel more organic and grounded. It shows that the Order evolved over time, made mistakes, and tried to learn from them.