Check the obvious first, switch the spark plug wires front to rear, rear to front and try again.
Maybe change spark plugs for new. Is there a frayed wire somewhere, crack in the bakelite, pickup brushes broken, or a short or close counter somewhere. Is something in the valve system binding? is the valve lash correct?
The line marking on the magneto can be off by one or more cogs, that may be caused by a replaced gear or shaft or something else, back in time. Still the magnet is OK, it is only the marking that needs to be altered. To check that and time the magneto, line up the markings on the gears first in order to check that they all are lined up.
At least one cylinder head must be off. Check top dead center on a piston and make a note of the distance to the cylinder top surface. That distance can vary greatly depending on piston type or manufacturer, what rods or stroke is used in the engine.
Advance the magneto with the handle to full advance and lock it there. Then turn the engine to ignition point on the magneto where the breakers just separate, and make a note on what cylinder that is occuring on. Lock the magneto gear with a small clamp or wedge or something so it doesn't turn on you.
Remove one of the idler gears and turn the engine so the piston is for a 45ci engine, 5/16" (8mm) before top dead center (+the eventual piston distance measured before), and for a 37ci engine 7/32" (5,5mm).
Put back the idler gear, the marking position on that gear does not matter in this stage, just put it in. Remove the mag.gear lock and turn the engine so the markings on the other gears line up again. Now the idler gear can be taken out again and turned so the marking on that lines up with the others.
Now looking at the magneto gear original marking, it may or may not be off with one or more cogs! That is ok for your particular magneto. Double check everything, go back and repeat all stages until you are sure. Also check cam timings when you are at it. Make notes and take pictures for later. I have found that notes with the pictures is important. I really mean pictures of the notes....!!! :-)
Now IF the gear marking is off and you are SURE about that, grind off the original marking and grind in a new one so the next time it is lined up correct and makes assembly so much easier.
Sorry, I have only documented Bosch DVAR/DVBR at this stage. Some pictures is showing breaker position when the gears is in the right position, lined up.