This commit covers the case where all objects get removed from local view, and an undo or blendfile read leads to such empty local views. It also adds code to remapping/foreachID View3D callbacks to tag potential local views as 'maybe empty', and use the View3D refresh callback to actually check and potentially exit the local empty view. Pull Request: https://projects.blender.org/blender/blender/pulls/123128