Reseting query on query clear.

https://www.openproject.org/work_packages/8386