A workaround is to place a 1 second sleep at the top of the main section of your code.
Data points:
In my case I am using c++ with SDL2 which invokes a traditional main() function.
The problem did not appear until I started running instruments to hunt down a memory leak.
My schemas all pass arguments to the program, but the duplicate app launch does not receive any arguments.