This does happen when you only research one upgrade, too.
If I have 40 Fleet supply left, and hit a research to start, if I queue up 11 LRMs, they won't build until I make the number 10 (to bring it to 0). No factories will build if fleet supply goes into a negative, even if the factories can build some of the ships.