The building you're making a prerequisite must be able to train a unit already. Farms and traders didn't work for us because they don't allow the training of any units in vanilla. Smiths work because they allow training of chariots.
Excellent find! I'll just sticky this for the time being untill it gets put into a guide. It will save quite alot of frustration when modding.