Rebuild value index at exit.