Confusing tooltip in barracks

Trying to add troops to a barracks. It’s a new one and I forgot the maximum was 12. When it stops letting me add any more, the message you get reads “The town is at capacity for this unit type”. What? The actual problem is the barracks is at maximum capacity and it has nothing to do with the type of unit. Really confusing message.