Improved cabal sandbox reuse logic