Restore whitelist when save fails.

Fixes whitelist not being restored when save fails due to no data.

Fixes #3646