Fixes bug 848806 - Rewrite parameters before assigning default values in search.