It's possible to have more than 9 units in a city, if a unit has a goto order that completes the same turn as a unit gets built.
Ok I'll see if I can fix it, although I have been toying with the idea that a stack of units can have more than 9 in it. Combat already supports nearly unlimited units per side. The only real constraints on the stack units in the rest of the game are various ui issues, but I can just make the unit sprites overlap/shrink if there are more than 9