PIM-1509 Fix restoring the form state