Coded workflow error on upgraded project


I recently decided to try out coded workflows in my existing project, but unfortunately I think I may have run into a bug.

When I add a coded workflow to my project, a warning appears in the output window:

If I click the message for more details this is what I see:

I can create a new project and use the coded automation fine, so I am guessing this could be a bug in the upgrade process for existing projects? Seems like there are some duplicate variables confusing the compiler

Any ideas on how I could resolve this? I’d love to start using more coded workflows in my project