Fix bug on .cabal file lookup algorithm