This happens almost every time I want to build this way:

I knock 2 buildings down planning to rebuild two other buildings.

I successfully start the first new building after the two I knocked down have completly dissappeared through their countdown.

Then, when I want to select the second new building - I get a notice that I have used up all my licenses. Occasionally I have to wait until I have logged out and reopened my browser before that remaining building license reappears correctly.