patch applied (cabal-branches/cabal-1.4): Check invariant on every construction and elide on lookups