Should help with cases like #3397 The existing tests in tests/publishing/test_uploader.py should verify that this doesn't cause regressions.