I had even more time, so I tried more things.
To recap, the error is reproducable by:
Turn 521 Incan: end turn
Turn 521 Mayan: end turn
Turn 522 Incan: end turn
Turn 522 Mayan: various things....
So the "various things" include:
- Upgrading a unit in the capital city (including upgrading multiple units at once, for example everyone becomes pikemen, macemen or longbowmen as applicable).
- Moving a unit from the capital city (I tried a catapult).
- Changing the top priority project at the capital (I tried a castle and a monument).
However the error can be avoided by:
- Moving a unit from another city (I tried a holkan from Køby and a crossbow from Landgrab).
- Adding something to the empty production queue of Landgrab (I tried a courthouse and a ball court).
Some things do not effect the error, for example changing the production queue of at least some cities. I think I tried changing the queue of Stienby.