I propose to add the option to ignore folded fragments of code when doing search (add the option for every kind of search/replace dialogs or panes). It is convenient to fold unused fragments more than to keep a persistent selection.
While this could be implemented, this would be yet another option in the user interface. Search & replace already now has rather many options. Given it is highly unlikely that we will implement this, I believe it's better to close this as wont-fix for now. If someone wants to implement this, we can certainly test and try to be convinced otherwise.