In this answer here, it's stated that Bitcoin uses a hashtable of all currently unspent outputs, in order to verify that the inputs of transactions haven't already been spent.
How does this interact with forks? If the Bitcoin client receives some blocks that go at the end of a fork that isn't the longest fork (perhaps, once they have all been verified, the new fork will be longer), how does it know what outputs are unspent in the fork that the blocks are being added to? A hashtable of unspent outputs in the current longest fork won't cut it.