This happened in 0.8 but I doubt it's changed in 0.9
My opponent had a stack of units sitting on a port. I attacked those units from land. I expected to be a favorite to win the battle but only had a 30% chance and ultimately lost (including a valuable hero and dragon).
When I looked at the combat in detail I was stunned to see my units fighting as Djonks (15 strength). I expected to fight as land units with my full strength. I never got any chance to upgrade my units to boats before the combat took place.
Either the player has to be able to upgrade first before combat OR land units attacking to ports must fight as land units with their full combat strengths (this is probably easier to code).
KGB