that air coil transformer is used in on 5-coil stator bikes to power aux illumination for speedo and running light. i think it pulls high amp 6v flux and transforms it to 12v. and only powers them if the headlight is on.
NOW: you said you have this wired exactly the same as another one? do you still have it? if so - replace known good components until you find your failure point.
i would still like to see how you have everything hooked up, and still will say that everything has to be grounded.
make sure the motor is grounded to whatever you are using as a common ground like the frame or swingarm.
you cant rely on the motor grounding to the frame or swingarm through the motor mounts!
i do not think that sharing grounds is causing your issue.