Thanks for reporting this we will investigate and try to come up with a permanent solution for this bug in the near future. Two solutions that might help for you:
1) Get you player to transfer ALL the units out of homeland. One a lot of pop frees up he might get like 20 more free peasants, or maybe 50, or maybe even 300 free peasants, but eventually it`ll stop. These free peasants he can add to armies and set-up Army Camp with them. Inside army camp he can put them to gather resources.
2) You player should try to add a new unit in the townhall like Horsecart, then right click the peasant button - that might cancel the peasant training.