Packaging error UnrealBuildTool.Rules

I’m getting this error when packaging:

The namespace “UnrealBuildTool.Rules” already contains a definition for LeapMotion

I read about similar issues and needing to delete duplicates, compiling without, then again with the script, but no idea how to implement in my case or if that advise is even relevant here. Thanks for a tip.

Benjy