This implements the suggestion from https://github.com/haskell/cabal/pull/3196#issuecomment-190285328