workaround for index invalidation issue in test suite

Cabal doesn't invalidate its indexes properly, which causes a problem in cabal-dev's tests. This is a workaround in the tests for that issue.

https://github.com/creswick/cabal-dev/issues/74#issuecomment-13856467
https://github.com/haskell/cabal/issues/1213