I have never worked on a model Z engine but it is a development of the S/T6 engine, so I would expect most parts to be similar, if not the same.
From your photo, the first thing that strikes me is that the spacers under the magneto look to be non standard. On the S6 they are headed pins with nothing protruding from the top (this makes it easier to align the magneto). Secondly, the drive from the stub shaft to the magneto is single sided on the S6 (having once got the timing correct, it is impossible to then time it up on the wrong cylinder). The drive dog that goes on the end of the magneto has just a single arm that locates in the slot in the stub shaft - the drive is taken on the solid side of the arm - the non-driving side is drilled for a ball and spring (which is trapped in the arm) - this prevents any backlash in the timing, and unnecessary rattles.
If you have already assembled the engine without timing the magneto, you may need to remove the timing cover to re-mesh the gears to get the correct timing - this is simple - just slide out the idler between the mag and inlet cam, time the magneto and refit the idler. If you have to remove the timing cover, leave it loose until the engine is back in the frame with the primary chaincase fitted and the engine through studs fully tightened, then tighten the timing cover nuts. If the timing cover nuts are not left to last, you may end up with the valve gear not being correctly clamped in place, resulting in further engine damage.
Hopefully, some of this will help,
Regards,
Eddie.