Which of the sentences below are grammatically correct?
- The couple had been engaged for five years when they married.
- The couple had been engaged for five years when they were married.
- The couple had been engaged for five years when they had married.
Only (1) sounds correct to me, but I am unable to explain why (2) and (3) are grammatically wrong.