AnnOMaly:
Ezra makes no suggestion in 4:12 that the foundations relate to the temple. We can infer from Ezra that the foundations of the city or walls are meant.
In contrast with Ezra, 1 Esdras adds that Darius granted permission for the city to be rebuilt (4:47-57). Ezra indicates Darius only supported the construction of the temple.
An overt distinction between rebuilding the temple or the city is a false dichotomy. The focus of the narrative is on the temple because the temple is of religious significance to a writer of the priestly class. It is more realistic that Cyrus and Darius gave permission to rebuild Jerusalem in general, including but not limited to the temple.
1 Esdras comments that in the 2nd year after they returned, "the builders built the temple of the Lord" (5:56-58). Josephus apparently understood it thus:
Those verses only indicated that they were rebuilding the temple, not that it was completed at that time. The context of the rest of the chapter indicates quite clearly that construction of the temple was ongoing.
1 Esdras has the period between the end of Cyrus' reign and Darius' reign as 2 years (5:73). Josephus has it as 9 years (Ant. XI.2.2)
The 'two years' in 5:73 is correctly understood to mean Darius' second year of reign (i.e. two years after his accession), not that there were only two years between Cyrus and Darius.
Interestingly, 1 Esdras isn't in chronological order anyway.
Cyrus - 2:1-16
Artaxerxes - 2:16-30
Darius - 2:30-5:6
Cyrus - 5:7-73
Darius - 6:1-7:15
Artaxerxes - 8:1-end
So all-in-all, it doesn't make sense to me to use 1 Esdras (even via Josephus) to argue that Ezra 4 keeps strict chronological sequence and that v. 6-23 referred to the years between Cyrus and Darius.
The claim made in the list above that 1 Esdras chapter 2 isn't in chronological order is going back to the same circular argument as before. 1 Esdras chapter 2 specifically identifies the temple foundations, so without deferring to speculation that the name assigned to Persia's king must refer to a later king with the same (throne) name, the plain reading of 1 Esdras indicates two sections, both in chronological order:
Cyrus - 2:1-16
'Artaxerxes' (Bardiya) - 2:16-30
Darius - 2:30-5:6
Cyrus - 5:7-73
Darius - 6:1-7:15
Artaxerxes - 8:1-end