The imperfect or aorist indicative, accompanied by ἄν, signals iterativity in the past.
Any restrictive relative, temporal or conditional clause or indirect question dependent on this type of main clause will take the optative.
There is no evidence for this nuance in the main clause before the fifth century B.C.E.
Iterativity in the past is expressed in this way particularly by Herodotus and in Attic texts.
ὁπότε δὲ διάσχοιεν αἱ πλευραὶ τοῦ πλαισίου, τὸ μέσον ἂν ἐξεπίμπλασαν
Whenever the sides of the square drew apart, [the mobile contingents] filled up the centre.