Hello Ian,
I had faced almost a similar issue with an application in the past. I found that the same application was instrumented by AppMon and UEM feature was enabled on it.
Once I disabled the UEM from the AppMon then duplication of scripts gone and UEM started work accordingly.
Regards,
Babar