This is somewhat complicated, but I will try to explain what is happening as clearly as possible. In the first screen snapshot below, I have just conquered Misam V which owned the shipyard that is visible 2 cells down and to the left. When I conquered Misam V, the shipyard had some ships based in it which got ejected because the shipyard is now mine.
Here is the problem: the ships that were ejected from the shipyard got placed in the cell just to the right of the shipyard, but I already have a fleet positioned in that cell. This results in my enemy and I both having fleets in the same cell. The second screen snapshot shows the 2 fleets. The 5 ship fleet is mine and the 4 ship fleet belongs to the Arceans.
Recommendation: modify the code that ejects the ships from the shipyard to find an empty cell in which to place the ejected ships.

