Fix the project view state migration issue.

This fixes #6934.

@dangoor Can you review this fix?