I would find a real estate lawyer in the area and buy an hour or two of his time. There are sometimes ways of doing things you wouldn't think of.
As an example, back in the 80s I was part of a couple of small limited partnerships in Noe Valley / San Francisco. One of the buildings we bought (these were the old San Francisco type houses you see in all of the pictures) was two units in the front building with a walk way underneath to the rear building that had two more units. The rear building had been built wood on the ground and the foundation was all rotted out. All of the buyers who looked at it turned it down because the rear building would have to be torn down by hand and everything hauled out by hand through the tunnel under the front building.
Peter, a very smart person running the operation, consulted a real estate / construction lawyer. The codes read that if you had to replace 50% or more of the foundation, then the building had to come down. What no one else knew is that in another place in the codes, it stated that if foundation work was done in separate years, it was basically considered to be un-related to other foundation work done in other years.
We bought the building. First Peter replaced 50% of the foundation of the rear building and supported the other side so the building was secure. Then he worked on rehabbing the front building. By the time it was done, we were in a new year. He got another permit to replace the other half of the rear building - all perfectly legal and to the code.
After getting the building very cheaply because no one else wanted to buy it to deal with the rear building, we made very nice money on it and great tax write offs.
You might be able to build the front half of the building one year, then get a permit to add on to it the next year. That might be considered different than building it all as one building to start with.
Bill