There appears to be a bug when you get to your last building licence. it often won't let you use it.
This appears most when you have demolish buildings to free up licenses. The only way to cure it seems to be to do a refresh and login again. However I did notice earlier after doing this for the 3rd time, that when I came back to the game after 10 mins it had cured itself, so the problem may be with the data not getting updated quick enough.