Duplication is caused as a result of the save_main_session option. This also breaks argparse because same options will be defined multiple times. Imported from Jira [BEAM-1319](https://issues.apache.org/jira/browse/BEAM-1319). Original Jira may contain additional context. Reported by: altay.