I am struggling to decide the correct tense / verb usage where one wishes to express some past plan for the then future:
We agreed that, when xyz happens, we would do abc.
We agreed that, when xyz happened, we would do abc.
According to Future in the Past, the second form is correct because one must use Simple Past with clauses that begin with time expressions (such as "when"). This assessment is somewhat supported by this answer, which suggests that the past tense must be used since xyz has already occurred and is now in the past.
However, to my mind, the second form doesn't quite convey the same contingency that abc would not be done until xyz happened; whereas the use of the present tense in the first form better conveys that contingency.
Are grammatical constructs of this sort known by some formal name? What do authorities on English (especially British English) have to say on the matter (citations would be most welcome)?