Fix a bug in tabs restore selected pane method. Now it works even if no pane can be selected based on its hash.