Lets say basic turrets have a cap of 100 for this example. If I have 90 basic turrets operational, and 10 basic turret remains, then the build turret menu shows I can still build 10 more basic turrets.
I'm not sure what will happen next, but it has to be one of the fallowing:
1) The interface shows I have 10 remaining basic turrets, but I'm not permitted to build them due to the remains.
2) I can build 10 more basic turrets, and then the remains will stay as remains forever.
3) I can build 10 more basic turrets, and then the remains will be rebuilt, and I'll have 110 basic turrets which is higher than the cap.
Whatever happens, it's no good.