Fixed on the Cabal 1.20 branch:
https://github.com/haskell/cabal/commit/8af39a5f827dcf5b5ca68badc2955e4cccbb039d

I suggest we update the submodule to use that.