Fix the issue of losing working set files.

This fixes #6574.