Fix search inconsistency between Python versions

Closes #2012
Merge pull request #2025 from BrunoReX/search_term

Fix search inconsistency between Python versions