I suspect you started with a stator issue, and while removing the flywheel caused a jarring motion that released the magnets from the flywheel. when you reassembled you glued part of the magnets backwards.
When you removed the flywheel was the area behind the magnets clean or rusted like they had been loose for a while.