What I thought was an "optimization" was really a bug. The "use search for expansion" value needs to be set for every panel, even panels in other tabs. Otherwise it won't be properly set when switching back to a tab that was visited during search. Differential Revision: https://developer.blender.org/D9427