"Missing Event 'x' for Event x from Source: y" compilation error popping up during packaging. How should I fix it?

I didn’t find the cause, but did find a solution. Deleting the Binaries, Saved and Intermediates folder and recompiling the project seems to have gotten rid of the errors.