not a bug, just a slight annoyance. This happens because nations will always try to get free land, and the third party in this case grabs the land faster than the two at war. I don't think this will get fixed, since it would require some heavy changes to the core systems