Put down the spymaster and lock it. The worst that can happen, is that you lose the legion barracks in between the two spies. And you can replace it at any time. It will only be slightly annoying to get rid of the tech.
If you get 2 locks later, lock the corner spy and the barracks before him and kill the architect, that way the whole tech will be gone in one go, and you can focus on the rest.
Don't be afraid to farm atziri while building the temple, you can always force the architect in his future spot later.
The architect will never jump to a place where he will create a loop. He will always move only to a spot where he doesn't connect to anything, or to a spot where he connects to one room only. If he can't do that he'll stay where he is.
It can only loop if you accidentally place other rooms on two sides of the architect.
I killed the architect and atziri all throughout the building process and got 5 or 6 exceptional sacrificial regalia dropped. I did up until I had 74 rooms or something.