Revert to the previous selection in the file tree if there's an error.

Fix for #9313.
Merge pull request #9317 from adobe/dangoor/9313-binary-file

Revert to the previous selection in the file tree if there's an error.