I'm not sure whether this minor 'bug' really even needs to be looked at but anyway...
I recently had an event where I discovered a foreign spy (or something like that). The result was a war declaration ("Take this as a declaration of war"), and I received six free units. The 'bug' is that I received Tanks - even though I had not yet discovered Rifling! I had discovered a number of Industrial Era tech's, such as Automobile and quite a few of the corporations, but I didn't have Riflemen yet and certainly not the tech' to build any Tanks.
Was amusing to put the 50-strength tanks to work against riflemen.
It's a mismatch between the event and the unit it grants. The event can trigger once you have discovered Industrialism (where Tanks are located in regular BTS) but the Python code doesn't actually check for the right techs to build the unit. We could do some kind of check in the code to give you a fallback unit.