- The last time we've seen it, it was a gate.
- The last time we saw it, it was a gate.
- The last time we'd seen it, it was a gate.
I'm not certain about the aforementioned sentences, namely, which is/are correct and meaningful constructions.
Further confusion is brought by these constructions from one authoritative textbook:
This is the first/only/best/worst time I have heard her sing.
This was the third time I had been in love that year.
So what is the right way of using tenses in the given context?